Detecting the current tab in a tab panel 
Author Message
 Detecting the current tab in a tab panel

It seems there is no way to detect the name of the current tab in a tab
panel.
I tried using the caption property but couldn't do anything with it. I want
a function to execute when you click on a specific tab, but not on others.

Mitch Bicquet

remove the "nospam" from my email address to write me



Sun, 01 Aug 2004 06:53:38 GMT  
 Detecting the current tab in a tab panel

Quote:

> It seems there is no way to detect the name of the current tab in a tab
> panel.
> I tried using the caption property but couldn't do anything with it. I want
> a function to execute when you click on a specific tab, but not on others.

> Mitch Bicquet

> remove the "nospam" from my email address to write me

Why not use the 'TabPanel1.value'? If you know the panel number, use this in
the tabpanels actions event:

If me.value = ? then // replace the ? With the tab number.
// do this and that
end if

Regards.
--------
Chris Willis - Macinware
http://www.macinware.f2s.com



Sun, 01 Aug 2004 07:03:18 GMT  
 Detecting the current tab in a tab panel

Quote:



>> It seems there is no way to detect the name of the current tab in a tab
>> panel.
>> I tried using the caption property but couldn't do anything with it. I want
>> a function to execute when you click on a specific tab, but not on others.

>> Mitch Bicquet

>> remove the "nospam" from my email address to write me

> Why not use the 'TabPanel1.value'? If you know the panel number, use this in
> the tabpanels actions event:

Sorry, the 'Change' event.

Quote:

> If me.value = ? then // replace the ? With the tab number.
> // do this and that
> end if

> Regards.
> --------
> Chris Willis - Macinware
> http://www.macinware.f2s.com


Works here (run in the change event):

----
EditField1.text = me.caption(me.value)
----

So....

----
If me.caption(me.value) = "mycaption" then
// do this
Else
// do that
End if
----

Tested under 4.0.2fc2.

Regards.
--------
Chris Willis - Macinware
http://www.macinware.f2s.com



Sun, 01 Aug 2004 07:06:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Tabs, Tabs, Tabs!!

2. Tabs within Tabs

3. Win95 Tab/TabStrip - Want to use keyboard navigation between tabs

4. Selecting TAB sheet by pressing TAB key

5. Tabbing through tabs

6. Button to goto next tab / previous tab

7. tab order inside tab

8. VI crashes on load because of hidden tab in tab control

9. Inkey() value of Shift-Tab in Windows 98 is the same as Tab

10. Enabling/Disabling Tabs on Tab Control in an *.EXE

11. Disabling Tabs on Tab Control

12. Enabling/Disabling Tabs on Tab Control in an *.EXE

 

 
Powered by phpBB® Forum Software