![]() |
|
#1
|
|||
|
|||
|
Hey
Anyone know how I can set a certain item of a listbox "checked" on startup of the application (so I guess on formcreate) but something like "listbox1.items[0].checked := True; doesn't work (which is logical as the listbox doesn't use such easy item handling as let's say a adoquerry...
|
|
#2
|
|||
|
|||
|
I believe you are talking about the TCheckListBox component, which has a Checked property, which is well documented in the Delphi Help...
![]() gLes |
|
#3
|
|||
|
|||
|
Hey
No, I don't use the checklistbox component, just the standard one ... I don't need checkboxes either, I just want the first item in my listbox "selected" when I start my application
|
|
#4
|
|||
|
|||
|
Oh..that...you misled me with the word 'check' in the question title
![]() Simply put ListBox1.ItemIndex := 0; into the OnCreate event of your form ![]() And better set the form's ActiveControl property to ListBox1 to insure that the listbox will have focus on the form at startup ![]() gLes |
![]() |
| Thread Tools | |
| Display Modes | |
|
|