Einzelnen Beitrag anzeigen

Graffi

Registriert seit: 5. Apr 2007
Ort: Duisburg
28 Beiträge
 
Delphi 6 Enterprise
 
#3

Re: VirtualStringTree: "Beispiel" beschreibt Form.

  Alt 8. Apr 2007, 15:29
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 ...
  Mit Zitat antworten Zitat