How to Use Tab Panels

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
toledor
Posts: 7
Joined: Sat Apr 08, 2006 7:21 am
Contact:

How to Use Tab Panels

Post by toledor » Wed Apr 18, 2007 5:50 am

With regards to Tab Panels, how does one get groups of form elements to appear in a different tab? I have a feeling that it has to do with grouping elements, and toggling each group's visiblility, based on the tab selected. But I am unsure of "best practices" in achieving this. Also related, should all of these individual groups be grouped themselves to the tab panel (in the event that the tab panel is rearranged on the card)?

Thank you in advance.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Apr 18, 2007 8:42 am

Hi toledor,

You got it right. Make groups of objects and show and hide these objects depending on the active tab of a tab menu button.

Another possibility is to put the objects on separate cards and go to a particular card depending onthe active tab.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

snowfun
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 16
Joined: Tue May 29, 2007 7:22 am

tabbed buttons

Post by snowfun » Thu Jun 07, 2007 4:32 pm

is it possible to set which tab is "active" when a card opens? I populate a tabbed button with different tabs according to previous user action (which works fine) but I want it to automatically hilite the first tab.
Cheers,
Tim

kpeters
Posts: 112
Joined: Wed Mar 21, 2007 9:32 pm

Post by kpeters » Fri Jun 08, 2007 2:30 am

Yes, and you can do it like this:

Code: Select all

set the menuhistory of button "your tabmenu button" to 1 -- make the first tab from the left the active one
HTH,
Kai

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jun 13, 2007 4:48 pm

Alternatively:

select line 2 of btn 1

works for a tab menu button.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Re: How to Use Tab Panels

Post by seaniepie » Wed Nov 09, 2011 6:43 pm

You posted this back in Jun 2007 originally but it just saved me :D

Code: Select all

select line 2 of btn 1
Awesome

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: How to Use Tab Panels

Post by Mark » Fri Nov 11, 2011 7:37 pm

Cool! :-)
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply