Home > Back-end >  C Builder 6.0 an attribute about ListBox, consult
C Builder 6.0 an attribute about ListBox, consult

Time:10-05

I use the ListBox - & gt; The Items - & gt; Add (String);
I added a lot of records
I want to initialize the default choice when the first or one record

CodePudding user response:

ListBox1 - & gt; ItemIndex=0;//selected first
ListBox1 - & gt; ItemIndex=2;//select the third item

CodePudding user response:

Yes, it's so

CodePudding user response:

Added a little:
ListBox1 - & gt; ItemIndex=ListBox1 - & gt; IndexOf (" would you like to see the selected string ");

CodePudding user response:

Demon, personally reply to force ah, ha ha