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

ComBoBox pass the selected Text 1

Status
Not open for further replies.

Rached

Programmer
Mar 30, 2003
54
DK
Hi all.. can you please help in this small thing?
I have two comboboxes, on activation the form, i populate both of them with the same items text, by adding, so far ok. I would like to set the selected text of combobox2 to that one of combobox1. I have two events handles, one ComboBox1DropDown and the other ComboBox1Change i tried the following lines but it does not work:
ComboBox2->Text = ComboBox11->Text;

and in another way this line:
ComboBox2->SelText = ComboBox1->SelText;

but again, none works. can you help plz!
tnx
 
sorry reply was late, but that helped alot, simple and easy, tnx man.
 
or try this

ComboBox2->ItemIndex = ComboBox2->Items->IndexOf (ComboBox1->SelText);

tomcruz.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top