Topic: [SOLVED] Child Combobox Auto-select Single Item
Greetings fellows!
.
I was hoping someone could offer some ideas- as I was unable to find anything on the forum.
.
Here is the situation:
I have two comboboxes and one is a parent. After the parent (customer) item is selected, WHEN there is only a single (address) child item, I wish for it to be selected automatically by default. Otherwise, the user will select a desired choice from the multiple items.
.
This is a minor issue, but it would make one less click for user entry
.
I have tried many different things, but I am not familiar enough with the order that the OnEvents occur to get the desired result.
Manually clicking the button - works as desired
OnCloseUp - Doesn't work at all
OnChange - Works, but then it unsets the item from the combobox
OnClick - Same as above (seems to work better than the others however)
.
I noticed the OnChange seems to click the button twice, perhaps this is because of the child.DoOnChange though...
.
Other things I tried:
using DbItemID instead of ItemIndex. Which is how I have been setting combobox values in the past...
changing the DefaultIndex value for the child combobox.
My guess is that this has something to do with the behavior of the parent and child comboboxes. Or maybe there is a better way?
.
NOTE: In addition to removing the .exe file, I also removed the sqlite.dll because it was over 1MB in each folder and the forum said the file was too large.
.
I appreciate anyone taking a look.
-joshuA