Die sind auch aus dem Beispiel kopiert:
Datatype:
Delphi-Quellcode:
type
PMyRec = ^TMyRec;
TMyRec = record
Caption: WideString;
end;
OnGetText:
Delphi-Quellcode:
procedure TFMain.TVElemente1GetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: WideString);
var
Data: PMyRec;
begin
// A handler for the OnGetText event is always needed as it provides the tree with the string data to display.
// Note that we are always using WideString.
Data := Sender.GetNodeData(Node);
if Assigned(Data) then
Text := Data.Caption;
end;
Selbst eine Änderung von "Caption" in z.B. "Captions" bringt nichts ...