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!

How to remove TString in ListBox?

Status
Not open for further replies.

Totte

Programmer
Jun 6, 2001
317
0
0
SE
I have a totally ordinary ListBox in which i have TStrings, I can Add(), alter the string by assigning new value and such but how do I remove a string in that ListBox?
Can't find any help in OnLine or books.
 
Newermind, i did some research and found the answer on but i'm glad Your'e all out there when the "you know what" hits the fan.
 
Probably u could save the content to a temporary array, then clear the list box and reassign from the array.

Fravio..
 
Well, actually i had that in mind but found that i could use "ListBox1->Items->Delete(ListBox1->ItemIndex);", this removes the selected item in the ListBox, simple as that :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top