Discussion:
Radio Buttons on multiple cards
Peter Bogdanoff via use-livecode
2018-11-17 05:28:09 UTC
Permalink
Hi,

A question about LC mechanics:

I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set.

When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card.

I don’t see this universal choice as a button property. Is this to be done by scripting?

Peter Bogdanoff
ArtsInteractive
Phil Davis via use-livecode
2018-11-17 08:04:38 UTC
Permalink
Hi Peter,

Set the sharedHilite of each button to true. That'll give you what you want.

Phil Davis
Post by Peter Bogdanoff via use-livecode
Hi,
I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set.
When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card.
I don’t see this universal choice as a button property. Is this to be done by scripting?
Peter Bogdanoff
ArtsInteractive
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
--
Phil Davis
Peter Bogdanoff via use-livecode
2018-11-17 16:08:15 UTC
Permalink
Thanks Phil, that did it. I was trying to set the group sharedHilite, which can’t be done.

Peter
Post by Phil Davis via use-livecode
Hi Peter,
Set the sharedHilite of each button to true. That'll give you what you want.
Phil Davis
Post by Peter Bogdanoff via use-livecode
Hi,
I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set.
When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card.
I don’t see this universal choice as a button property. Is this to be done by scripting?
Peter Bogdanoff
ArtsInteractive
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
--
Phil Davis
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
Phil Davis via use-livecode
2018-11-17 18:28:14 UTC
Permalink
Hmmm. Here is what I tried, and the hilites 'stick' across all cards in
the stack:
- create stack
- add 2 radio buttons
- group them
- set the sharedHilite of each radio to true
- add another generic button to the card
- group the newest button with the group of radios
- make new card
- place that last group on card 2

Result:
Radio hilites stick across both cards

I'm not sure why your experience would be different than this. Do you
have any scripts that fiddle with the radio hilites?

Phil
Post by Peter Bogdanoff via use-livecode
Thanks Phil, that did it. I was trying to set the group sharedHilite, which can’t be done.
Peter
Post by Phil Davis via use-livecode
Hi Peter,
Set the sharedHilite of each button to true. That'll give you what you want.
Phil Davis
Post by Peter Bogdanoff via use-livecode
Hi,
I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set.
When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card.
I don’t see this universal choice as a button property. Is this to be done by scripting?
Peter Bogdanoff
ArtsInteractive
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
--
Phil Davis
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
--
Phil Davis
Peter Bogdanoff via use-livecode
2018-11-17 19:27:17 UTC
Permalink
I did get it to work, as you said, by setting each button individually, rather than trying to set the whole group. So I’m good. Thanks!

Peter
Post by Phil Davis via use-livecode
- create stack
- add 2 radio buttons
- group them
- set the sharedHilite of each radio to true
- add another generic button to the card
- group the newest button with the group of radios
- make new card
- place that last group on card 2
Radio hilites stick across both cards
I'm not sure why your experience would be different than this. Do you have any scripts that fiddle with the radio hilites?
Phil
Post by Peter Bogdanoff via use-livecode
Thanks Phil, that did it. I was trying to set the group sharedHilite, which can’t be done.
Peter
Post by Phil Davis via use-livecode
Hi Peter,
Set the sharedHilite of each button to true. That'll give you what you want.
Phil Davis
Post by Peter Bogdanoff via use-livecode
Hi,
I have a stack of 10 cards, sharing the same background on each. That background group contains a sub group of a 2-button radio set.
When the user selects radio button 2 on any particular card, I want radio button 2 of all 10 cards to be also selected. All I see is the button set working independently on each card.
I don’t see this universal choice as a button property. Is this to be done by scripting?
Peter Bogdanoff
ArtsInteractive
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
--
Phil Davis
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
--
Phil Davis
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...