Common objext for all cards of stack.

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
calvax
Posts: 9
Joined: Fri Dec 30, 2011 6:10 pm

Common objext for all cards of stack.

Post by calvax » Sun Jan 01, 2012 5:30 pm

Is it possible to create a button or field that exist in every card of stack? For example if I have 15 cards and I want a "quit" button active on every card, shall I create 15 different "quit" button, one for card, or it's possible to create only one, active for all cards? thanks

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

Re: Common objext for all cards of stack.

Post by Mark » Sun Jan 01, 2012 6:29 pm

Hi,

Create the button, group it, give group a name, go to next card, choose your group from the Place submenu from the Objects menu.

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

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

Re: Common objext for all cards of stack.

Post by dunbarx » Sun Jan 01, 2012 9:24 pm

Group your button at the very beginning of stack creation. Set its "backgroundBehavior" to "true". It will appear on all newly created cards.

If you already have many cards and want to make such a button, you go through the same procedure, but, as Mark said, you manually have to "place" it on each card. (This process is scriptable, of course) At least, however, from that point on, the group will place itself if you then go and create new cards.

Craig Newman

Post Reply