![]() |
StringGrid --> FixedRows nicht neu zeichnen (OnDrawCell?)
Hallo,
Ausgangssituation ist folgende: per Abfrage im OnMouseUp-Ereignis prüfe ich mit Hilfe von MouseToCell die angeklickte Spalte im StringGrid. Diese wird dann entsprechend ab- bzw. aufsteigend sortiert. Nun will ich das ganze aber auch noch visualisieren indem ich eine Art Pfeil in der jeweiligen Zelle darstelle. Ich schaffe es auch, daß das Bild angezeigt wird. Allerdings nur ganz kurz, da nämlich sofort alles wieder duch das OnDrawCell alles überschreiben wird. Kann ich das irgendwie verhindern? Ich hoffe, ich hab das Problem gut genug beschrieben :lol: ereetzer |
Re: StringGrid --> FixedRows nicht neu zeichnen (OnDrawCe
Du mußt das ACol, ARow überprüfen ! Vermute außerdem, daß das irgendwie falsch deklariert ist. 8)
|
Re: StringGrid --> FixedRows nicht neu zeichnen (OnDrawCe
hmm, hab aber ne Abfrage drin:
Delphi-Quellcode:
das klappt aber trotzdem nicht.
if ARow > 0 then...
edit: hier mal nen bißchen Code aus OnMouseUp:
Delphi-Quellcode:
procedure TForm4.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer); var iColumn, iRow: integer; Bild: TBitmap; Rect: TRect; begin sort := not sort; StringGrid1.MouseToCell(X, Y, iColumn, iRow); if (iRow = 0) and (iColumn <> -1) then begin SortStringGrid(StringGrid1, iColumn, sort); end; if iRow = 0 then begin Bild := TBitmap.Create; Bild.LoadFromFile('C:\Blau.bmp'); // TEST Rect := StringGrid1.CellRect(iColumn, iRow); StringGrid1.Canvas.StretchDraw(Rect, Bild); end; |
Re: StringGrid --> FixedRows nicht neu zeichnen (OnDrawCe
probiere mal >1 aus oder > FixedRows. Verwechsle das auch immer.
|
Re: StringGrid --> FixedRows nicht neu zeichnen (OnDrawCe
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:23 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