Registriert seit: 19. Nov 2004
134 Beiträge
Delphi 7 Personal
|
Re: VST mit Objekten, Alle Nodes einer Spalte Durchlaufen
25. Mär 2006, 20:03
Also ich habe folgendes definiert, im Interface teil:
Delphi-Quellcode:
type
PTreeData = ^TTreeData;
TTreeData = record
FObject: TObject;
end;
TTreeDataClass = class
private
FProcName,
FDomainAndUser,
FTyp,
FSecurtyLvl,
FBasPrio,
FLokalPath,
FParentProc,
FWinTitel,
FFileProperty,
FCompany,
FStartTime,
FMemUsage: WideString;
FCpuUsage,
FThreads,
FPID,
FParentID,
FModules,
FRunTime,
FIconindex: Integer;
published
property ProcName: WideString read FProcName write FProcName;
property DomainAndUser: WideString read FDomainAndUser write FDomainAndUser;
property Typ: WideString read FTyp write FTyp;
property SecurtyLvl: WideString read FSecurtyLvl write FSecurtyLvl;
property BasPrio: WideString read FBasPrio write FBasPrio;
property LokalPath: WideString read FLokalPath write FLokalPath;
property ParentProc: WideString read FParentProc write FParentProc;
property WinTitel: WideString read FWinTitel write FWinTitel;
property FileProperty: WideString read FFileProperty write FFileProperty;
property Company: WideString read FCompany write FCompany;
property StartTime: WideString read FStartTime write FStartTime;
property MemUsage: WideString read FMemUsage write FMemUsage;
property CpuUsage: integer read FCpuUsage write FCpuUsage;
property Threads: integer read FThreads write FThreads;
property PID: integer read FPID write FPID;
property ParentID: integer read FParentID write FParentID;
property Modules: integer read FModules write FModules;
property RunTime: integer read FRunTime write FRunTime;
property Iconindex: integer read FIconindex write FIconindex;
end;
Und mit dieser Funktion füge ich meien nodes hinzu:
function AddVSTStructure(AVST: TCustomVirtualStringTree; ANode: PVirtualNode;
AObject: TObject): PVirtualNode;
var
Data: PTreeData;
begin
Result:=AVST.AddChild(ANode);
Data:=AVST.GetNodeData(Result);
AVST.ValidateNode(Result,False);
data^.FObject := AObject;
end;
@Igotcha
Ich habe jetzt deinen code probiert jedoch funktioniert es nicht, so sieht jetzt mein Timer Ereignis aus:
Delphi-Quellcode:
procedure TForm1.ProcTimerTimer(Sender: TObject);
var
TreeObject : TTreeDataClass;
node : PVirtualNode;
Data : PTreeData;
begin
VST.BeginUpdate;
Node := VST.getfirst;
while Assigned(Node) do
begin
Node := VST.Getnodedata(Node);
TTreeDataClass(Data.FObject).MemUsage:= 'hier der neu zugewiesener wert';
VST.GetNext(Node);
end;
VST.EndUpdate;
end;
Was mache ich falsch?
[edit=sakura] [delphi]Tags Mfg, sakura[/edit]
|
|
Zitat
|