Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TAdvSmoothListBox
Adding items & extra properties in code
Adding items & extra properties in code
In design time the AdvSmoothListBox has some items by default. Below you can see how to add items in code and in some cases extra properties can be set to change the item appearance.
procedure TForm1.AddPoints; var i: integer; begin //Adds 20 items for i := 0 to 20 do begin with AdvSmoothListBox.Items.Add do begin Enabled := True; //If enabled false then the item will be drawn in disabled fill GraphicLeftType := gtCheckBox Checked := False; //the item will be checked if the type is a checkbox or a radiobutton Caption := ‘Item ’+ inttostr(i); Info := ‘Info ’+ inttostr(i); Notes := ‘Notes ’ + link Splitter := false; //if splitter is true a empty space will be drawn between 2 items DetailControl := Panel1 //depending on the action chosen to visualize the details the detailcontrol will be shown. Level := 1; //Set the level property to allow expanding and collapsing item groups Indent := 30; //Set the indent property to visually indent the item. end; end; end;