Creating New Cards When 'Behave Like a Background' is True
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Creating New Cards When 'Behave Like a Background' is True
My main stack has a tab panel which fills the window. The stack has three cards, one for each tab. The tab group property "behave like a background" is checked, and clicking each tab displays a different card. The whole thing is almost the same as the LiveCode lesson on using tab buttons (I would post the link but I lack permission to do so). ... It's your basic tabbed interface.
What I'd like to do now, though, is have a button click display a *different* card--that doesn't "behave like a background," i.e., no tabs, and positioned at a different place on the screen than the rest of the cards.
Is this possible in LC? If so, any hints?
Thanks! -- Al C.
What I'd like to do now, though, is have a button click display a *different* card--that doesn't "behave like a background," i.e., no tabs, and positioned at a different place on the screen than the rest of the cards.
Is this possible in LC? If so, any hints?
Thanks! -- Al C.
Re: Creating New Cards When 'Behave Like a Background' is Tr
To remove a group from a specific card see "remove" in the dictionary. (use the message box to issue the command to remove). It sounds like what you may want to do is create a new stack which opens when you click this button. See "go" in the dictionary.
Re: Creating New Cards When 'Behave Like a Background' is Tr
Also:
Create the new card
Select the group (that is behaving like a background)
From the menu select Object >Remove group.
done
Simon
Create the new card
Select the group (that is behaving like a background)
From the menu select Object >Remove group.
done
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Creating New Cards When 'Behave Like a Background' is Tr
My thanks to you both for your replies! Quite helpful. I read the documentation; my question is answered. ... Looking around on my own some more I also came to see part of the issue for me is/was confusion between the concept of a card and that of a stack. I think, ultimately, I was talking about creating a new stack in this case.
Re: Creating New Cards When 'Behave Like a Background' is Tr
Hi acolburn,

Best
Klaus
Example: You can only display ONE card of a stack at a time, but you can have many substacks and the mainstack open at the same time.acolburn wrote:My thanks to you both for your replies! Quite helpful; they answer the question. ... I am still a little confused here about the difference (and the advantages/disadvantages) between creating a new card vs. creating a new sub-stack of my main stack?

Best
Klaus
Re: Creating New Cards When 'Behave Like a Background' is Tr
Hi acolburn,
Substacks are good containers for large snippets of code or functions that you intend to use in different applications, it is easy to copy the substack to a new main stack e.g.:
I have a substack that queries the shell for information on serial numbers of USB devices plugged in. Easy to add that to a new app. Could it all be incorporated into the card script? Yes.
As a beginner you probably will just deal (ha) with cards
I'm sure there are plenty of other good reasons to use a substack but I haven't used them for anything else (I think).
Simon
EDIT: OH I see... And what Klaus says!
Substacks are good containers for large snippets of code or functions that you intend to use in different applications, it is easy to copy the substack to a new main stack e.g.:
I have a substack that queries the shell for information on serial numbers of USB devices plugged in. Easy to add that to a new app. Could it all be incorporated into the card script? Yes.
As a beginner you probably will just deal (ha) with cards

I'm sure there are plenty of other good reasons to use a substack but I haven't used them for anything else (I think).
Simon
EDIT: OH I see... And what Klaus says!

I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!