How to "click a tab in a TabControl" from code?

donaldc104

Active member
Joined
Jan 4, 2003
Messages
32
Is there a way to "mouse-click a tab" on the top of a TabControl from code? Ive tried several tactics but cant make it work yet.
 
If you mean you want to change the selected tab from code, just do something like this:

Code:
TabControl1.SelectedTag = TabPage1
 
This works great - thanks !

This works great ! Thank you very much, Divil !

Just one small typo: "Tab" not "Tag"

NG: TabControl1.SelectedTag = TabPage1
OK: TabControl1.SelectedTab = TabPage1


I searched high and low and couldnt find this. But its so obvious after you spell it out.
 
Back
Top