On Mon, 12 Sep 2005, A.J. Venter wrote:
Hi all,
A Quick question, I know how to find out which item in a TListBox was select
with single selection. Now however, I wish to do a multi-selecting one, how
can I determines which ITEMS were selected.
Ideally I need to be able to feed all the selected items into a loop and step
over them one by one. Does A TlistItem have a ''selected'' property ? Would
doing a for loop over the TListBox.Items testing for selected work ?
Use the Selected[Index : Integer] property:
S:='';
For I:=0 to MyListbox.Items.Count-1 do
If MyListbox.Selected[i] then
S:=S+', '+MyListbox.Items[i];
ShowMessage('The following items are selected: '+S);
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives