Use MenuPick properly
Klaus major-k
klaus at major-k.de
Sat Feb 7 10:42:22 EST 2015
Hi Pascal,
> Am 07.02.2015 um 16:18 schrieb Pascal Lehner <tate83 at gmail.com>:
>
> Hi all,
>
> I use menuPick to have a button with a drop down menu. The menu items are
> loaded from a database and the users selection needs to be stored back
> there too.
>
> the dropdown list looks as following (id, name)
> 1, full
> 2, half full
> 3, empty
>
> I save the users selection in two fields on the card
> item 1 in a hidden field ( to be stored in the database record)
> item 2 is displayed in another field
>
> obviously, the dropdown list does not look very nice like this. Even more
> so when I look at a real-world example with several words for "name"
>
> Can you think of a way to display only the "name" in the dropdown list, but
> still save the id in the hidden field?
1. fill your menu with only the names.
2. later only save -> the menuhistory
and not the "menupicked" item :-)
Know what I mean?
The menuhistory will give you the LINE NUMBER of the selected menu item.
Will of course only work with sequetially numberd items. 8-)
> Thanks,
> Pascal
Best
Klaus
--
Klaus Major
http://www.major-k.de
klaus at major-k.de
More information about the use-livecode
mailing list