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

delete an item from listbox 1

Status
Not open for further replies.

JunglesMcBeef

Programmer
Sep 18, 2003
266
G'day,

I am very new to delphi, I was just wondering how to delete an item from a list box if the item has been double clicked.
 
easy. Add this code to the ListBox's OnDblClick event:

procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
with ListBox1 do
Items.Delete(ItemIndex);
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top