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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding temp value to TComboBox (csDropDownList)

Status
Not open for further replies.

dlare9

Programmer
Apr 3, 2007
12
0
0
JP
I've a Combo box with Style = csDropDownList.

What I want is to add a temporary content to the list,
for example "<Select Item>". This value would be only be present on first load. Once the user select an item it would not be present anymore.

What I've done is set the ItemIndex to -1 and Text value to "<Select Item>" . Hardcoded and in Property Editor but the result is a Combo box with a blank "" as initial value.


I also have tried to change the Style to csDropDown. Although it resulted to what I'm looking for, but one major drawback is that the user can modify (Edit the Text content) the Items in the Combo box.


is there a solution or is it just one of the limitation in combo box?

any help would be much appreciated.

Regards,
dlare9
 
I'm trying to remember if a combobox has a read-only value you can set.


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top