combobox

Kee Nethery kee at kagi.com
Sun Mar 20 18:47:59 EDT 2011


OK, comboboxes appear to be rather complicated and I'm stumped.

As a user types into a combobox I use 
   on rawKeyUp keyCode
to notice that a new character has been added to the combobox.

I then do a database search to see all the data that matches the characters currently in the combobox.

I then replace all the data in the combobox with the data returned from the database. This puts the first alphabetical value as the combobox label (or whatever that is referred to).

This all works fine.

The thing I want to do next is to select the characters after what the user actually typed in the ?label? of the combobox so that the next character they type replaces all those. For example:

user types:

joe

script returns

joebill
joebob
joemammy
joemomma

The value displayed in the combobox is now

joebill

and what I want "selected" in the combobox is "bill" (if capital letters signify a selection ...)

joeBILL

so that if the user types "m" the combobox the script is now going to display

joemAMMY

and the selections presented will just be

joemammy
joemomma

what script would select some of the characters within "joemammy" like for example characters "ammy" (aka characters 5 to 8)?

Thanks,
Kee Nethery



More information about the use-livecode mailing list