![]() |
TMemo automatisch scrollen
Hallo,
in einem XE3 Projekt scrolle ich automatisch an das untere Ende in einem Memo Feld: LogMemo.VScrollBar.Value := LogMemo.VScrollBar.Max; Unter XE7 ist aber VScrollbar Protected, wie scrolle ich hier automatisch ans Ende???:?:?:? Viele Grüße |
AW: TMemo automatisch scrollen
Delphi-Quellcode:
?
LogMemo.GoToTextEnd();
|
AW: TMemo automatisch scrollen
Damit setzt ich den Cursor zwar ans Ende aber der sichtbare Bereich verändert sich leider nicht...
|
AW: TMemo automatisch scrollen
Zitat:
|
AW: TMemo automatisch scrollen
Ich mach das so:
Delphi-Quellcode:
mem_input.SetFocus;
mem_input.CaretPos := Point(0,Zeile); SendMessage(mem_input.Handle, EM_SCROLLCARET, 0, Zeile); |
AW: TMemo automatisch scrollen
Zitat:
Zitat:
|
AW: TMemo automatisch scrollen
Zitat:
|
AW: TMemo automatisch scrollen
So der Tip mit der Helperklasse hat mir die Lösung gebracht:
Delphi-Quellcode:
Dann erfolgt der Aufruf im Programmcode nur noch mit
unit MemoHelperU;
interface Uses System.Classes, FMX.Memo, FMX.Layouts; type TMemoHelper = class helper for FMX.Memo.TMemo private published procedure AutoScroll; end; implementation procedure TMemoHelper.AutoScroll; Begin if Self.VScrollBar = nil then ApplyStyleLookup; if Self.VScrollBar <> nil then Begin Self.GoToTextEnd; Self.VScrollBar.Value := Self.VScrollBar.Max; Self.Repaint; End; End; LogMemo.AutoScroll Vielen Dank für die Hilfe! |
AW: TMemo automatisch scrollen
Ich wundere mich trotzdem immer noch- Er verschiebt bei dir wirklich den sichtbaren Bereich bei
Delphi-Quellcode:
nicht? Ich nutze XE7 ohne Update 1 und er tut es...
GoToTextEnd()
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:17 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