Combobox: hot to move the selection while typing ?

BlitzMax Forums/BlitzMax Programming/Combobox: hot to move the selection while typing ?

semar(Posted 2006) [#1]
All,
I would like to know if a Bmax combobox can behave like a VB combobox, that is, typing a string when the combolist is displayed, should move the selected item accordingly.

Suppose you have a sorted combobox with a list like:
Apple
Avocado
Banana
Mango
Marmelade
Peech
Water melon

You want to select, for example, Marmelade.

Clicking on the combo down arrow button, you will presented with the full list; typing with your keyboard the letter M, the list should automatically locate and select the first item starting with M (in this case, Mango).
While you type, M A R it should now locate and select Marmelade.

Is it possible with the Bmax GUI ? Or should I create a user combobox, with some automation inside ?

Thanks for your attention,
Sergio.


semar(Posted 2006) [#2]
Bumpy


ozak(Posted 2006) [#3]
This is usually a custom control in most languages. Except in VB :)

Edit: Then again. Calling VB an actual language, might be a stretch ;)


Dreamora(Posted 2006) [#4]
Except:+ .NET

and VB.NET is used more and more for regular applications.


semar(Posted 2006) [#5]
Ok, but how to replicate this behaviour with a BMax Combobox control ?


Dreamora(Posted 2006) [#6]
Only by creating an own combobox gadget. the actual one does not allow usage of the textfield and the dropdown list at the same time.


semar(Posted 2006) [#7]
Thanks.

Do you know how to create an own gadget then ?

Is it possible to extend the main gadget, like
type mycombo extends ComboBox

?

Or you mean that the mods should be modified and then re-compiled ?


Dreamora(Posted 2006) [#8]
You must modify the module with C / C++ code and add the needed "hooking" in BM code to get it working.

Extending TGadget within BM does not work (nor does extending TWin32Gadget and others)


semar(Posted 2006) [#9]
Okee-Dokee.

It's not a trivial task then...