highlight a tab through script

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

highlight a tab through script

Post by jalz » Wed Apr 22, 2015 10:36 pm

Hi

I have tab panel with 3 tabs, red, green, blue. The tab panel I have works quite well, showing and hiding groups depending on what tab is clicked.

However I wanted to know if it was possible to show the pressed state of a tab from an external button? I'm building a menu up, and although I know how to display/show the contents of group x, I can't seem to figure out how to show the tab x was selected.

Thanks as always
Jalz

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10394
Joined: Wed May 06, 2009 2:28 pm

Re: highlight a tab through script

Post by dunbarx » Wed Apr 22, 2015 10:44 pm

Hi.

Why, just:

answer the hilitedText of btn "yourTabPanel"

Craig Newman

jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Re: highlight a tab through script

Post by jalz » Thu Apr 23, 2015 9:48 pm

Thank you Craig :)

Klaus
Posts: 14267
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: highlight a tab through script

Post by Klaus » Thu Apr 23, 2015 11:04 pm

Hi Jalz,

you can also:
...
set the menuhistory of btn "your tabbed btn" to X
...
Where X = the NUMBER of the TAB.


Best

Klaus

jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Re: highlight a tab through script

Post by jalz » Thu Apr 23, 2015 11:24 pm

Cheers Klaus

I think thats a neater way for me to do it

Post Reply