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/)
-   -   Delphi TVirtualStringTree, Images oder auch nicht (https://www.delphipraxis.net/129709-tvirtualstringtree-images-oder-auch-nicht.html)

hoika 24. Feb 2009 12:15


TVirtualStringTree, Images oder auch nicht
 
Hallo,

in Abhängigkeit der Nodes blende ich Images ein oder nicht
(OnGetImageIndex).
Hat ein Node ein Image, wird zuerst das Image und dann der Text angezeigt.
Passt ...

Habe ich ein Node ohne Image (ImageIndex=-1), wird der Text angezeigt,
ohne Platz für ein leeres Image zu haben.

Die Texte sind schlechter lesbar.

einmal ganz links (ohne Image), einmal weiter rehcts (mit Iamge).

sicher könnte ich jetzt ein leeres (opaque ?) Image anlegen und zuweisen,
aber kann der das viell. selbst ?

Die Images sind alle gleich gross.

Danke


Heiko

chaosben 24. Feb 2009 13:41

Re: TVirtualStringTree, Images oder auch nicht
 
Du kannst im BeforeCellPaint den Wert von ContentRect.Left um Bildesbreite erhöhen, sofern der aktuelle Knoten kein Bild hat.
Das müsste helfen.


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:14 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