ComboBox PreSelected Item

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

ComboBox PreSelected Item

Post by kpassaur » Sun Mar 18, 2007 7:52 am

I would like to know if this can be done and how. I have a dialog box that is used for mapping. There are eleven comboboxes on the dialog and they all contain the same list. The user has the Field on the left which is a label and next to it is the combobox with the drop down list.

The list is the same for each Field as it contains the values the user can map to. It works fine except that each time it is run the user would has to start over. I Know which value goes in the box I just don't know how to have it selected.

In other words is there a "SelectedItem" value that can be set or does it always have to be the first one on the list?

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Sun Mar 18, 2007 2:25 pm

You need to set a value for Dialog.msComboBox.ItemIndex

for instance if you have Item1 Item2 and Item3 in the comboBox, you could set Dialog.msComboBox.ItemIndex=3 to make Item3 appear as the selected value when the dialog is shown next.

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Combo Box index item

Post by kpassaur » Sun Mar 18, 2007 2:31 pm

Thank you works like a charm

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts