How to add a value to an Item of a menu option button

Jérôme Rosat jrosat at mac.com
Sun Dec 26 18:34:13 EST 2004


Ken,

Thank you very much.

The answer appears so simple.

You are a genius.

Jérôme Rosat

Le 27 déc. 04, à 00:10, Ken Ray a écrit :

> On 12/26/04 4:51 PM, "Jérôme Rosat" <jrosat at mac.com> wrote:
>
>> Bonjour à tous,
>>
>> In my database, I've got a table with two fields and many records:
>>
>> Value Name
>>
>> 12  Name1
>> 16  Name2
>> 25  Name3
>> etc.
>>
>> On a card I created a menu option button with items come from the 
>> field
>> Name of my database:
>> Menu Items:
>> Name1
>> Name2
>> Name3
>> etc.
>>
>> But when I select an option, I need to now the value of the item
>> selected, not the item itself.
>> For example, if I select "Name2", I need to know the value "16".
>>
>> How to add a value to an Item of a menu option button ?
>
> Yes. You can add a custom property (like uMenuValue) to the option 
> button
> that contains the values, one on each line:
>
> 12
> 16
> 25
>
> And then do this:
>
> on menuPick
>   put line (the menuHistory of me) of the uMenuValue of me into tValue
>   -- gets the corresponding line in the custom property to the line 
> selected
>   -- in the option menu
>
>   -- do something with tValue
> end menuPick
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list