Hide tab panel button -- SOLVED --

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AndyPiddock
Posts: 3
Joined: Tue May 30, 2006 11:12 am

Hide tab panel button -- SOLVED --

Post by AndyPiddock » Wed Oct 29, 2008 1:16 pm

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?
Last edited by AndyPiddock on Wed Oct 29, 2008 4:31 pm, edited 1 time in total.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Wed Oct 29, 2008 1:32 pm

Hi Andy,

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

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

AndyPiddock
Posts: 3
Joined: Tue May 30, 2006 11:12 am

Post by AndyPiddock » Wed Oct 29, 2008 1:50 pm

Thanks Jan,

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

??

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Wed Oct 29, 2008 3:26 pm

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
Last edited by bn on Thu Oct 30, 2008 1:00 pm, edited 1 time in total.

AndyPiddock
Posts: 3
Joined: Tue May 30, 2006 11:12 am

Post by AndyPiddock » Wed Oct 29, 2008 4:31 pm

Thanks Bernd, that's sorted it.

Post Reply