Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Tviruaildrawtree Draw node side by side ? (https://www.delphipraxis.net/189913-tviruaildrawtree-draw-node-side-side.html)

drama22 7. Aug 2016 22:22

Tviruaildrawtree Draw node side by side ?
 
i asked this question here

http://stackoverflow.com/questions/3...ltree/38812358

but i don't get an answer that solve my issue

i wanted to draw nodes inside virtuailtree side by side can i do that ?

i try to do something like that

Delphi-Quellcode:
procedure TForm2.VDTAniBeforeCellPaint(Sender: TBaseVirtualTree;
  TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
  CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
var
  Data: PAnimeData;
  NewRect: TRect;
  R: TRect;
begin
//
  if not Assigned(Node) then
  begin
    exit;
  end;

  Data := VDTAni.GetNodeData(Node);

  case Column of
    0, 1 ,2, 3, 4, 5, 6, 7:
  begin
  TargetCanvas.Brush.Style := bsClear;
  TargetCanvas.FillRect(CellRect);
  NewRect := ContentRect;
  NewRect.Left := NewRect.Left;
  NewRect.Width := 55;
  NewRect.Height := 55;
  NewRect.Top := NewRect.Top + 2;
  NewRect.Bottom := NewRect.Bottom;

  if Column = 0 then
  begin

    with NewRect do
    begin
      TargetCanvas.StretchDraw( NewRect, Data.FObject.anmigraphic);
    end;

  end;
end;
still nodes comes Vertically . can i draw nodes side by side in VDT ? or that's not possible ?


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz