![]() |
Für FMX TGrid OnTopLeftChanged nachempfinden?
Hallo ich möchte zwei(eigentlich 3) FMX TGrids Synchronisieren.
Also auf das ändern der obersten-linken-angezeigten-Zelle reagieren. Wie kann ich das machen? Hintergrund: Für eine vom Benutzer bearbeitbare Many-to-Many Beziehung brauche ich ein Gitter mit nicht vertikal rollendem header und Nicht horizontal rollender Seitenleiste... Da es ja FixedCol Nicht mehr gibt, emuliere ich eine Fixedcol durch ein benachbartes TGrid. |
AW: Für FMX TGrid OnTopLeftChanged nachempfinden?
Versuchs mal mit dem Event "OnViewPortpositionChange"...
|
AW: Für FMX TGrid OnTopLeftChanged nachempfinden?
OK, SetTopLeft ändert ja auch ViewPortPosition.
Allerdings hat TGrid OnViewPortpositionChange nicht published... ich suche es mal
Delphi-Quellcode:
procedure TStyledGrid.SetTopLeft(const ACol, ARow: Integer);
var R: TRect; LCol, LRow: Integer; begin if ((ACol >= 0) or (ARow >= 0)) and (ACol < Model.ColumnCount) and (ARow < Model.RowCount) then begin LCol := Max(0, ACol); LRow := Max(0, ARow); R := CellRect(LCol, LRow); AniCalculations.BeginUpdate; try if not AniCalculations.Down then AniCalculations.MouseDown(0, 0); AniCalculations.MouseLeave; if ACol < 0 then ViewportPosition := TPointF.Create(ViewportPosition.X, R.Top) else if ARow < 0 then ViewportPosition := TPointF.Create(R.Left, ViewportPosition.Y) else ViewportPosition := TPointF.Create(R.Left, R.Top); finally AniCalculations.EndUpdate; end; AniCalculations.UpdatePosImmediately(True); end; end; |
AW: Für FMX TGrid OnTopLeftChanged nachempfinden?
OK, das geht :)
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:05 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 by Thomas Breitkreuz