![]() |
Wieder einmal Autoscroll im Memo-Feld
Hallo!
Ich nutze für meine Android-App ein Memo-Feld im Read-only-Modus, das in der gewählten Schriftgröße Platz für 24 Zeilen hat. Ist es möglich, das Memo zu einem Autoscroll zu bewegen, wenn eine 25. Zeile hinzugefügt wird, so dass diese als letzte im Memo-Feld angezeigt wird? Probiert habe ich ![]() Gruß Rüd |
AW: Wieder einmal Autoscroll im Memo-Feld
Hast Du mal die ScrollTo Optionen angesehen und damit etwas versucht?
Ich nutze ScrollToTop, was bei meiner Anwendung funktioniert, aber solche Basics wie Scrolling sind immer wieder extrem fragil.
Delphi-Quellcode:
procedure TCustomPresentedScrollBox.ScrollToCenter(const AAnimated: Boolean);
var ContentBoundsTmp: TRectF; ViewportSizeTmp: TSizeF; DestPoint: TPointF; begin ContentBoundsTmp := ContentBounds; ViewportSizeTmp := ViewportSize; DestPoint := TPointF.Create((ContentBoundsTmp.Width - ViewportSizeTmp.Width) / 2, (ContentBoundsTmp.Height - ViewportSizeTmp.Height) /2); ScrollBy(DestPoint.X - ViewportPosition.X, DestPoint.Y - ViewportPosition.Y, AAnimated); end; procedure TCustomPresentedScrollBox.ScrollToTop(const AAnimated: Boolean = True); begin ScrollBy(0, -ViewportPosition.Y, AAnimated); end; |
AW: Wieder einmal Autoscroll im Memo-Feld
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:41 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