>How do I select a list box control (using code). I've tried using say
>if ListBox1.items.count > 0 then
> ListBox1.selected[0] := true;
>but I get an exception "List Index out of bounds (0)". The help indicates that
>"selected" can be used to check if the current line is selected but doesn't
> say if you can use it to set it.
Is multiselect turned on... If not then the selected item is indicated by the ItemIndex
property. It's possible that the Selected[n] array property is not populated unless
multiselect is true.
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz