AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

TVirtualStringTree -> TStringGrid

Ein Thema von hoika · begonnen am 13. Feb 2009 · letzter Beitrag vom 13. Feb 2009
 
hoika

Registriert seit: 5. Jul 2006
Ort: Magdeburg
8.277 Beiträge
 
Delphi 10.4 Sydney
 
#1

TVirtualStringTree -> TStringGrid

  Alt 13. Feb 2009, 19:14
Hallo,

ich will ein TVirtualStringTree in ein TStringGrid umformen.
Er ist wie ein ListView aufgebaut (ein RootNode, kein Baum).

Ich bin bisher soweit.


Delphi-Quellcode:
class procedure TListViewToolClass.LVToGrid(
  theListView: TVirtualStringTree; theStringGrid: TStringGrid);
var
  iCurCol : Integer;
  iCurRow : Integer;
  Node : PVirtualNode;
  sText : String;
begin
  theStringGrid.ColCount:= theListView.Header.Columns.Count;
  theStringGrid.RowCount:= theListView.RootNode.ChildCount+1;

  for iCurCol:= 0 to theListView.Header.Columns.Count-1 do
  begin
    theStringGrid.Cells[iCurCol, 0]:= theListView.Header.Columns[iCurCol].Text;

    for iCurRow:= 0 to theListView.RootNode.ChildCount-1 (?) do
    begin
      if Assigned(theListView.OnGetText) then
      begin
        Node:= theListView.RootNode. (?)
        theListView.FOnGetText(Self, Node, iCurCol, TextType, sText);
      end;
    end;
  end;
end; { TListViewToolClass.LVToGrid }

Bei der folgenden Zeile hänge ich.
for iCurRow:= 0 to theListView.RootNode.ChildCount-1 (?) do Wie bekomme ich die Zeilenzahl raus ?

Danke


Heiko
Heiko
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:04 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz