Board index » delphi » Newbie ListBox Question

Newbie ListBox Question

I have data in a ListBOx that is loaded via a comma delimited stream. How do I get the string value of a selection, not the position, but say I double click a state that is in the ListBox, I want to take that State name and use it elsewhere. I can't find the function to get the state name.

HELP.

Thanks,
Brent

 

Re:Newbie ListBox Question


if listbox.itemindex > -1 then
  myvar := listbox.items[listbox.itemindex]

Quote
"Brent" <bsc...@NOSPAM.usipp.net> wrote in message news:3c11a102_1@dnews...

> I have data in a ListBOx that is loaded via a comma delimited stream. How

do I get the string value of a selection, not the position, but say I double
click a state that is in the ListBox, I want to take that State name and use
it elsewhere. I can't find the function to get the state name.
Quote

> HELP.

> Thanks,
> Brent

Other Threads