How to share buttons and fields across cards
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 6
- Joined: Sun Jul 15, 2018 9:30 pm
- Location: Edinburgh, Scotland
How to share buttons and fields across cards
I have just started my first attempt at making something that would be useful for me in Livecode. I want to create a a sort of Song Rolodex.
I have made a Stack and I have added some cards to it. On the first Card I have added the Navigation widget and some Fields. However when I go to the next or previous Card in the Stack the Navigation bar and the Fields are not visible.
I have been looking at the Property Inspector and fiddling with things there but no luck.
Am I misunderstanding how things behave in Livecode?
I have made a Stack and I have added some cards to it. On the first Card I have added the Navigation widget and some Fields. However when I go to the next or previous Card in the Stack the Navigation bar and the Fields are not visible.
I have been looking at the Property Inspector and fiddling with things there but no luck.
Am I misunderstanding how things behave in Livecode?
Graeme
Mac iMac 2012
MacOS 10-15
Livecode 9_6_4
Mac iMac 2012
MacOS 10-15
Livecode 9_6_4
Re: How to share buttons and fields across cards
For the controls you want to show up on every card, you want to group them, then click the 'sharedBackground' property of the group.
-
- VIP Livecode Opensource Backer
- Posts: 11
- Joined: Mon Oct 31, 2011 3:46 pm
- Location: Edinburgh, Scotland
- Contact:
Re: How to share buttons and fields across cards
Thanks for that.
I'm not sure why, initially when I did what you described it didn't work but once I deleted the second card and made a new card it did work.
I have one further question but it is to do with scripting a Field so I will post it on the forum separately
Thanks again for your help
I'm not sure why, initially when I did what you described it didn't work but once I deleted the second card and made a new card it did work.
I have one further question but it is to do with scripting a Field so I will post it on the forum separately
Thanks again for your help
IMac MacOSX 10.13
Livecode 9.0.0 Build 15103
Livecode 9.0.0 Build 15103
Re: How to share buttons and fields across cards
Glad I could help
In the case where it did not work, if the 2nd card was already existing when you grouped the controls and set the shared property, they wouldn't be placed on it automatically, only on new cards going forward. I don't know if that is what happened with your case, but it is the only thing I can think of off the top of my head.
In any case, glad it is working now.
In the case where it did not work, if the 2nd card was already existing when you grouped the controls and set the shared property, they wouldn't be placed on it automatically, only on new cards going forward. I don't know if that is what happened with your case, but it is the only thing I can think of off the top of my head.
In any case, glad it is working now.
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: How to share buttons and fields across cards
Hi.
A group with backGroundBehavior set will be seen on all newly created cards. It will not, however, automatically appear on any pre-existing cards. You have two options:
1- Plan ahead, so that the group is created early. Then all new cards will be covered. I never do this.
2- Use the "place" command to add the group to any or all existing cards. This can be done under script control.
Craig Newman
A group with backGroundBehavior set will be seen on all newly created cards. It will not, however, automatically appear on any pre-existing cards. You have two options:
1- Plan ahead, so that the group is created early. Then all new cards will be covered. I never do this.
2- Use the "place" command to add the group to any or all existing cards. This can be done under script control.
Craig Newman
Last edited by dunbarx on Mon Jul 16, 2018 8:20 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to share buttons and fields across cards
Groups can also be placed manually via the "place group" menu item.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com