on 12-17-2014 4:42 PM
I have a tabpages like tab_1.tabpage_1 ,tab_1.tabpage_2,tab_1.tabpage_3
how to get active tabpage tag in a command button of the form .
Please help.
Many Thanks
Pol
Hi Polachan;
PB does not have a method to give you this information at run time. I just added this functionality to my new STD Integrated Framework version that will be released soon.
What you need to do in your PB application is keep track of the active Tab Page in the SelectionChanged event of the TabControl. In there you need to map the "Index" argument given in this event to the Tab Control's "Control" array to get the object pointer.
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Similar to Chris pseudo-code:
dragobject ldo_tabpage
ldo_tabpage = tab_1.control[tab_1.selectedtab]
MessageBox('Tag',ldo_tabpage.tag)
That would give you the tag of the currently active tabpage.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the button is on the page itself, then the parent of the button is the page. So:
string ls_name = parent.classname( )
If you need the name of the tab, simply follow the same logic - the parent of the page is the tab control itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you use the SelectedTab property of the tab control?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.