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

Overriding the ComboBox SetItemIndex method

Status
Not open for further replies.

sparky1970

Programmer
Feb 8, 2009
5
GB
Hi all,

I'm trying to establish how I can use a SetItemIndex method so that I can force an Index Item to show in a ComboBox when it is first shown. I know that I can simply use a ComboBox->Text = ""; instruction to load text into the ComboBox, but I'd rather use an instruction which loads it with an Item from it's Item list. I need to override the protected SetItemIndex method which is derived from TCustomListControl. I have no idea how to implement the code to do this, can somebody help me?

Thankyou
Ivan
 
I did that simply by setting the ItemIndex to the item it should show.

Actual snip: cbbCOMport->ItemIndex = Counter;

Totte
Keep making it perfect and it will end up broken.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top