Exact number of a radio button in a group
tareq_tawaiha
tareq_tawaiha at yahoo.com
Sun Oct 25 15:47:24 EDT 2009
That would be GREAT if i had 1 group , but i have over 80 groups, each group
has 4 possible answers (radio buttons). That would mean i would have to go
into every button's script and add that script. Which could be my last
resort , but i would prefer to edit 80 groups , instead of over 300 buttons
. Is there away to control it from the group itself instead of editing every
button ?
Richmond Mathewson-2 wrote:
>
> tareq_tawaiha wrote:
>> This might be a simple question. I have 4 buttons in a group. Each
>> buttons
>> name and label are similar for that button. If i edit the group then
>> select
>> a button and check its "Size and position" in the property inspector , at
>> the end of the inspector there is a field called number, is there a way
>> to
>> use that number in a script ?
>>
>> I have made sure that for all the buttons in my group (top to bottom) the
>> number of the buttons are (1, 2 , 3, 4) (In the picture i attached , if
>> i
>> inspect button "simple" it is one , button colorful it is "2" see
>> attached
>> picture).
>>
>> I want to be able to assign a letter (A,B, C and D) for every button
>> when
>> selected. If a user selects "colorful" then i want to put "b". I could
>> use a
>> switch statement IF i could get that assigned number .
>>
>> I use this code , its not working ( any other way of doing this ?)
>>
>> on mouseDown
>> get the hilitedButtonName of me
>> put it into bname
>> put bname
>>
>> get the number of button bname
>> put it into X
>>
>> switch X
>>
>> case "1"
>> put "A"
>> break
>>
>> case "2"
>> put "B"
>>
>> case "3"
>> put "C"
>> http://www.nabble.com/file/p26050917/Picture%2B1.png
>> case "4"
>> put "D"
>>
>> end switch
>>
>> end mouseDown
>>
> What an incredibly complicated way of doing things!!!!!!
>
> I made a stack with a copy of your group and put these scripts into
> buttons "simple", "colorful", "large" and "visible" respectedly:
>
> on mouseUp
> put "a" into fld "fOUTPUT"
> end mouseUp
>
> on mouseUp
> put "b" into fld "fOUTPUT"
> end mouseUp
>
> on mouseUp
> put "c" into fld "fOUTPUT"
> end mouseUp
>
> on mouseUp
> put "d" into fld "fOUTPUT"
> end mouseUp
>
> no stress, no mess!
>
> Love, Richmond.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
--
View this message in context: http://www.nabble.com/Exact-number-of-a-radio-button-in-a-group-tp26050917p26051143.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list