I'd like to put a 'next' button onto each card of a stack. In Hypercard I could put buttons into either cards or backgrounds. I have not seen yet how it is possible to make a button appear on each card.
Asked
Active
Viewed 746 times
2 Answers
3
In LiveCode you can create a background group that can be on every card. First create your button(s) select it (them) and press "group" in the toolbar. That will create a group. In the inspector for the group you then select "Behave like a background". All new cards will have your button(s) automatically. If you already created a bunch of cards you can always add the group by selecting "Object => Place Group => " in the menu.

hliljegren
- 426
- 3
- 9
-
http://docs.runrev.com/Property/backgroundBehavior --- Use the backgroundBehavior property to make groups behave like HyperCard backgrounds, and to automatically place groups on newly created cards. – z-- Apr 19 '13 at 03:57
-
see also http://lessons.runrev.com/s/lessons/m/4071/l/13031-How-do-I-use-the-same-controls-on-multiple-cards- – z-- Apr 19 '13 at 04:06
-
See also http://livecode.byu.edu/groups/Groups.php for an overview of the group object in LiveCode. – Devin Jul 22 '13 at 04:42
1
Backgrounds are probably the single biggest thing to unlearn if you're coming from a HyperCard background because they act a bit differently in LiveCode. But they have a lot more power than the old HC backgrounds did, so the pain in making the transition pays off well in the long run.

mwieder
- 231
- 2
- 6
-
1Thank you for this note. In the user's guide I found chapter 4.2.26 Groups & Backgrounds – for organizing, and sharing controls. I understand that a group may be considered a background in many cases. For this to happen *Behave like a background* has to be selected as a propertly of the group as Hliljegren noted. Where do you see more power of the groups? That several of them may be combined on one card? Can I store data in a background? What else is more powerful? – z-- Apr 18 '13 at 20:13
-
Yes you can store data in a background (as you can in any object!) You can set a custom property of the group. You also have the inheritance of properties in group, you can place groups in other groups etc, but now we are walking away from the main question. – hliljegren Jul 31 '13 at 11:54