My little contribution

skipper

Member
Licensed User
I spent some time in finding a solution for the app I'm writing and I would like to share it.
I needed to use the same combobox as selectable input for different TextBox.
The reason is that in the real app the combo is quite huge (more than 8000 items - all the italian city) and I would like to save some memory (only 1 combo instead of 6).
I'm using the same routine (PlaceCombo) to show at runtime the combobox overlapped to each single textBox and to display the last selected item. Choosing an item from the combo, the SelectionChanged event sets the text property with the selected item.

The trick consists in adding to the Form a selectable (visible and enabled) object (Button), hidden under a blank label, and moving the focus on it after each SelectionChanged event. (try to comment out the Button1.Focus instruction and see what happens...)

May be my code is wrong or it exists a better solution....any comment is welcome!

My 2 cents...

Mimmo
 

Attachments

  • testcombo.sbp
    1.9 KB · Views: 322
Top