Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Going to a line in TMemo (FireMonkey XE5)


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Dec 11, 2017 10:58 AM Last Post By: Remy Lebeau (Te...
Kenneth Czepelka

Posts: 22
Registered: 1/3/06
Going to a line in TMemo (FireMonkey XE5)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 9, 2017 2:24 PM
How can I go directly to a line in TMemo. I see I have ScrollTo but that only moves relatively.
Also how can I count the lines when text wrap is on since that is different than the actually line numbers.
Thanks
Mark Richards

Posts: 42
Registered: 12/8/99
Re: Going to a line in TMemo (FireMonkey XE5)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 10, 2017 5:09 AM   in response to: Kenneth Czepelka in response to: Kenneth Czepelka
Kenneth Czepelka wrote:
How can I go directly to a line in TMemo. I see I have ScrollTo but that only moves relatively.
Also how can I count the lines when text wrap is on since that is different than the actually line numbers.
Thanks
To determine the number of lines in a memo, simply use the Memo->Lines->Count property, this counts the correct number of lines added to the control ( A line is determined as ending with LF or CR/LF depending on Operating system)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Going to a line in TMemo (FireMonkey XE5)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 11, 2017 10:58 AM   in response to: Mark Richards in response to: Mark Richards
Mark Richards wrote:

To determine the number of lines in a memo, simply use the
Memo->Lines->Count property, this counts the correct number of lines
added to the control ( A line is determined as ending with LF or
CR/LF depending on Operating system)

I don't use FireMonkey. Does TMemo in FireMonkey support "soft" line
breaks, such as those added by word wrapping? Those kinds of breaks
would likely not be counted by the Lines->Count property.

--
Remy Lebeau (TeamB)

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02