Q: using combo boxes
Jim Lyons
jimlyons at earthlink.net
Fri Jul 16 07:26:30 EDT 2004
On Jul 15, 2004, at 7:12 PM, jeanne a. e. devoto wrote:
> At 10:19 AM -0400 7/15/04, Jim Lyons wrote:
>> I am missing something really basic about using combo boxes.
>> ...
>> How do I get/set the contents of the field?
>
> To get (from "How to determine the current selection in a menu"):
> get the selectedText of button "My Combobox"
Nope, this does not give you the contents of the field. It returns
empty.
> To set the field contents to one of the choices in the menu (from
> "How to change the selected item in an option menu or combo box"):
> set the menuHistory of button "My Combobox" to 2 -- or whatever line
Yes ma'm, I know how to do this part. 8^)
> I actually don't think there's any way to set the field contents to a
> line that's not in the menu from a script. (Does anyone know of one?)
Richard Gaskin said to use "the effective label", and in fact this
works, as does just "label". I searched on "effective label" and got
just one hit, on "label", and it very clearly explains this use for
combo boxes. I wondered why I hadn't found this in the docs, so I went
back and repeated the search on "combo box". It did not return the
entry for "label" among the 22 hits. 8^/ (Rev 2.2.1 OS 10.3)
Anyway, thanks for the reply. I use the docs dozens of times a day and
usually find exactly what I want, along with several other useful
things I didn't know. Can't wait to see the new version...
Jim Lyons
More information about the use-livecode
mailing list