Page 1 of 1

Hide tab panel button -- SOLVED --

Posted: Wed Oct 29, 2008 1:16 pm
by AndyPiddock
I'm trying to hide a tab (button) in a tab panel.
Tab panel name is 'Main Tab Menu'

I can disable it via:
disable menuItem 2 of Button "Main Tab Menu"

and have tried:
set the visible of menuItem 2 of Button "Main Tab Menu" to false
which has no effect

Also tried:
hide menuItem 2 of Button "Main Tab Menu"
which hides the whole tab panel.

Anyone know how to do this?

Posted: Wed Oct 29, 2008 1:32 pm
by Janschenkel
Hi Andy,

The only thing you can do is change the 'text' property of the tab button, effectively removing the line.

Jan Schenkel.

Posted: Wed Oct 29, 2008 1:50 pm
by AndyPiddock
Thanks Jan,

Do you mean this:
put "" into menuItem 2 of Button "Main Tab Menu"

??

Posted: Wed Oct 29, 2008 3:26 pm
by bn
Andy,

look at your tab panel in the inspector there you see under basic properties at the bottom "tabs" etc.
to control it from a script

Code: Select all

on mouseUp pMouseBtnNo
    if the number of lines of the text of btn "myTabPanel" = 3 then 
        set the text of btn "myTabPanel" to "Tab 1" & cr & "Tab3"
    else 
        set the text of btn "myTabPanel" to "Tab1" & cr & "Tab2" & cr & "Tab3"
    end if
end mouseUp
or something like this
corrected an error where instead of "myTabPanel" the script referred to btn 1 from an earlier version of the script.
cheers
bernd

Posted: Wed Oct 29, 2008 4:31 pm
by AndyPiddock
Thanks Bernd, that's sorted it.