<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Lazarus Pascal - TMemo scroll to last line ... - Delphi, Lazarus, Free Pascal				            </title>
            <link>https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-tmemo-scroll-to-last-line/</link>
            <description>Tweaking4All.com Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 15 Jul 2026 20:22:02 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Lazarus Pascal - TMemo scroll to last line ...</title>
                        <link>https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-tmemo-scroll-to-last-line/#post-5479</link>
                        <pubDate>Wed, 08 May 2024 12:48:28 +0000</pubDate>
                        <description><![CDATA[I wanted my TMemo to always scroll to the last line (log), and found two useful trick to move the cursor/caret to the line.
Easiest (I even placed this one in the memo.OnChange event):
Mem...]]></description>
                        <content:encoded><![CDATA[<p>I wanted my TMemo to always scroll to the last line (log), and found two useful trick to move the cursor/caret to the line.</p>
<p>Easiest (I even placed this one in the memo.OnChange event):</p>
<pre contenteditable="false">Memo1.selstart := MaxInt;</pre>
<p>TMemo will see that MaxInt is way too much and will select the last available position instead.</p>
<p>Of course you can also use the proper function for this, to position at the beginning (0) of the last available line (Memo1.Lines.Count-1):</p>
<pre contenteditable="false">Memo1.CaretPos := Point(0, Memo1.Lines.Count-1);</pre>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/">Delphi, Lazarus, Free Pascal</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/lazarus-pascal-tmemo-scroll-to-last-line/#post-5479</guid>
                    </item>
							        </channel>
        </rss>
		