Autor Beitrag
Frankieboy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65



BeitragVerfasst: Mo 28.09.09 09:05 
Hallo,

ich habe folgenden Code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var
  LastDuplicate: Pointer;
  TreeView_Duplicates: TTreeView;

[...]

begin
  LastDuplicate := TreeView_Duplicates.Items.Add(nil,'Duplicate '+IntToStr(d)+'; Size: '+
    IntToStr(Liste3[d-1].Groesse)+'; MD5: '+Liste3[d-1].MD5);
  { hier die Methode "Expand" des erzeugten TTreenode aufrufen }
end;


Ich bin mit Pointern relativ unerfahren.
Es wird mit der Methode Add ein TTreeNode in TreeView_Duplicates erzeugt. Der Pointer LastDuplicate soll auf diesen TTreeNode zeigen.
Wie führe ich danach mit Hilfe des Pointers die Methode Expand des erzeugten TTreenode aus?
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 28.09.09 09:18 
Moin!

user profile iconFrankieboy hat folgendes geschrieben Zum zitierten Posting springen:
Ich bin mit Pointern relativ unerfahren.
Es wird mit der Methode Add ein TTreeNode in TreeView_Duplicates erzeugt. Der Pointer LastDuplicate soll auf diesen TTreeNode zeigen.
Wie führe ich danach mit Hilfe des Pointers die Methode Expand des erzeugten TTreenode aus?
Ganz einfach: nimm keinen untypisierten Pointer, wenn du weißt, was für ein Objekt zu da hast. :idea: ;)
ausblenden Delphi-Quelltext
1:
2:
3:
var
  LastDuplicate: TTreeNode;
  TreeView_Duplicates: TTreeView;
cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.