AW: Listbox mit Farbflächendarstellung
Du bist genial... es geht.
Jetzt verstehe ich langsam diese Prozedur, wo "Index" ja auch in der Variablenübergabe auftaucht... Hier noch einmal die ganze Prozedur, falls sie jemand anderem noch helfen kann.
Delphi-Quellcode:
procedure TForm2.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState); begin with (Control as TComboBox).Canvas do begin // in ComboBox zeichnen Brush.Color := StringToColor(Stringarray[Index]); //im Stringarray befinden sich die HEX-Farbwerte Brush.Style := bsSolid; FillRect(Rect); Brush.Style := bsClear; TextOut(Rect.Left, Rect.Top, (Control as TComboBox).Items[Index]); end; end; |
AW: Listbox mit Farbflächendarstellung
Zitat:
Sowas übersieht man dann auch leicht in dem geposteten SourceCode auf Seite 1 :stupid: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:58 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