Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TComboBox 1

Status
Not open for further replies.
Apr 10, 2002
7
NO
Is there any way to programmically change the first item in the combo list to have an index of 1 instead of zero? If so, can you give me an example. I have tried the insert function and I have tried the move function, but these do not do what I need them to do.

Any help is appreciated.
 
You could add a dummy field at the beginning, eg a blank one or a 'please select a ...', before you add your data items.

You can also set the MyCombo.ItemIndex := 1, in the Form.OnShow event - check that MyCombo.items.count > 1 before you do that or an exception could occur if it's empty.

lou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top