Tips and Frequently Asked Questions
Using the DataObject
The DataObject can hold any object you like, but you are responsible for cleaning up any references to avoid memory leaks.
A typical use:
type TPerson = class FName: string; FBirthDay: TDateTime; public constructor Create(AName: string; ABirthDay: TDateTime); property Name: string read FName; property BirthDay: TDateTime read FBirthDay; end; ... implementation ... procedure TForm1.FormCreate(Sender: TObject); var I: Integer; n: TAdvCheckedTreeViewNode; begin FPersons := TObjectList<TPerson>.Create; FPersons.Add(TPerson.Create(''Tom Jones'', EncodeDate(2016, 1, 1))); FPersons.Add(TPerson.Create(''John Appleseed'', EncodeDate(2016, 1, 2))); AdvCheckedTreeView1.Nodes.Clear; AdvCheckedTreeView1.Columns[0].Text := ''Name''; AdvCheckedTreeView1.Columns.Add.Text := ''Birthday''; for I := 0 to FPersons.Count - 1 do begin n := TAdvCheckedTreeViewNode(AdvCheckedTreeView1.Nodes.Add); n.Text[0] := FPersons[I].Name; n.Text[1] := DateToStr(FPersons[I].Birthday); n.CheckTypes[0] := tvntCheckBox; n.DataObject := FPersons[I]; end; end; { TPerson } constructor TPerson.Create(AName: string; ABirthDay: TDateTime); begin FName := AName; FBirthday := ABirthDay; end; procedure TForm1.FormDestroy(Sender: TObject); begin FPersons.Free; end;
procedure TForm1.AdvCheckedTreeView1AfterCheckNode(Sender: TObject; ANode: TAdvTreeViewVirtualNode; AColumn: Integer); var p: TPerson; begin if Assigned(ANode.Node) and Assigned(ANode.Node.DataObject) then p := TPerson(ANode.Node.DataObject); end;
Pricing
Single Developer License
Small Team License
Site License
TMS VCL UI Pack
€ 375
€
150
yearly renewal
license for 1 developer
MOST POPULAR
BEST VALUE
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.
Free Trial
Note that the TMS VCL UI Pack replaces the TMS Component Pack. Both products can't be installed simultaneously. Therefore TMS Component Pack must first be uninstalled before installing the TMS VCL UI Pack