![]() |
StringGrid Problem nach draw cell
Nabend an alle; :hi:
Ich habe mit Folgendem Code Zellen im StrinGrid eingfärbt.
Code:
Funktioniert nur wird jetzt die jeweils markierte Zelle in weiss hinterlegt, und nicht wie normal in blau.Da die Schrift ebenfalls in weiss dargestellt wird, solange die zelle selektiert ist, ist das ziemlich blöd.
with Sender as TStringGrid do
begin s := Cells[ACol, ARow]; Canvas.Brush.Color := CellColor[Acol,Arow]; Canvas.FillRect(Rect); DrawText(Canvas.Handle, PChar(s), Length(s), Rect, DT_CENTER); end; Ich habe bereits versucht FillRect Brush auf clBackground zu stellen. ohne Erfolg. Wat nu? |
Re: StringGrid Problem nach draw cell
Hallo
du mußt den State abfragen und die Selektionsfarbe entsprechend setzen
Delphi-Quellcode:
Mfg Frank
if gdselected in state then canvas.Brush.Color:=clHighlight;
canvas.fillrect... |
Re: StringGrid Problem nach draw cell
Klappt!
Ich danke dir. Gruß MrFish :hello: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:46 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