Substack as tab in a Mainstack

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
ueliweb
Posts: 118
Joined: Wed May 11, 2011 9:47 am

Substack as tab in a Mainstack

Post by ueliweb » Mon Oct 31, 2011 8:34 am

Hei

I want create many different views to a tab panel.
I think it would be a good idea to do this in a substack because I can create a differnet size as the mainstack and put the views into cards. So I can integrate the logic also to the card as it is needed.

But how do I show/display a substack card in a mainstack?

I am sure there must be any Guide or some topic about it but I could not find one yet.
Perhaps I searching just wrong.
Please link me if possible ...

thanks
ueliweb

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

Re: Substack as tab in a Mainstack

Post by Mark » Mon Oct 31, 2011 10:36 am

Hi,

You can't use substacks, but you can make groups. Make as many groups as you need and show and hide them from the tab button.

Kind 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

ueliweb
Posts: 118
Joined: Wed May 11, 2011 9:47 am

Re: Substack as tab in a Mainstack

Post by ueliweb » Mon Oct 31, 2011 11:01 am

Thanks Mark

use groups means I can´t use them in an other card, just if I make it background behavior but then it is fix to one position.
And if I copy a group to another Card then I have all script double bad for changing it ...

Is it impossible in any way or just to integrate a substack into a tab panel of a mainstack?

thanks
ueliweb

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

Re: Substack as tab in a Mainstack

Post by Mark » Mon Oct 31, 2011 11:14 am

Hi,

No, you can "place" groups on cards. Have a look at the Objects menu. If I use multiple groups in combination with a tab button, I often keep these (different) groups on one card. If you want to use the same group multiple times, then you'll need multiple cards indeed. You need only one tab button because you can group and place the tab button too.There's no need for multiple copies of the same objects and scripts.

Stack panels are no solution in this case. Stack panes are for menus, not tab buttons (even though a tab button is also a type of menu button).

Kind 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

ueliweb
Posts: 118
Joined: Wed May 11, 2011 9:47 am

Re: Substack as tab in a Mainstack

Post by ueliweb » Tue Nov 01, 2011 7:41 am

Thanks again Mark

as I understand I will now include all data that fits to theme into one card and display it selective by a tab panel/ buttons...

- one card for persons information and data
- one card for groups/projects data
- one card for ...

kind regards
ueliweb

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

Re: Substack as tab in a Mainstack

Post by bn » Tue Nov 01, 2011 8:48 am

Hi ueliweb,

once you get used to the tab panel it is quite convenient. Most of the time it is not necessary to make different cards to display data. As Mark pointed out you can display data in groups on one card and the tab panel just hides/shows the groups.

I made a very simple layout of a card that does it. Than of course there might be reasons to do it differently.

tabPanel.livecode.zip
(2.13 KiB) Downloaded 274 times
Kind regards

Bernd

Post Reply