![]() |
Flatterhaftes tStringGrid
Hallo Leuts,
hab mal wieder 'n problem mit 'n tStringGrid, aber erst mal der code für die onCellDraw Routine
Delphi-Quellcode:
dabei kommt es zu zwei merkwürdigkeiten... :gruebel:
begin
with (sender as tStringGrid) do begin isSet := false; //Flag für Zeichenroutine if not (gdFixed in State) and (aRow > 0) and (aCol > 0) then begin if (aRow = 1) and (aCol = DayOf(dtpSelectDate.Date)) then //dtp = DateTimePicker begin canvas.Pen.Color := clRed; canvas.Pen.Width := 3; font.Color := clRed; font.Style := [fsBold]; canvas.Rectangle(rect); DisplayText((sender as tStringGrid), (sender as tStringGrid).cells[acol, arow], taRightJustify); isSet := true; end; //hier soll noch mehr gezeichnet werden if not isSet then begin font.Color := clBlue; font.Style := []; brush.Color := clWindow; Canvas.FillRect(Rect); DisplayText((sender as tStringGrid), (sender as tStringGrid).cells[acol, arow], taRightJustify); end; end; end; end; a) das ganze grid, flattert im program... keine ahnung warum, sieht jedenfalls recht unschön aus... b) es wird die falsche zelle fett dargestellt (hier: aCol+1) weiss jemand, wie man die beiden probleme beseitigen könnt? Herzlichen Dank gg |
Re: Flatterhaftes tStringGrid
hab die lösung gefunden... hier noch 'n link...
![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:48 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