Solved

problem with TMEMO

Posted on 1999-01-22
2
219 Views
Last Modified: 2010-04-06
In my program I'm creating lines in a TMemo-Object with the Syntax: Memoobject.Lines.Add('...');
The problem is that if all lines are printed, the last line is shown, but I want that the first line is shown (scroll bar at top...).
What command and syntax must I use therefore???
0
Comment
Question by:pman
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
Oli2 earned 50 total points
ID: 1362867
try:

Memoobject.SelStart := 0;
Memoobject.SelLength := 1;
Memoobject.SelLength := 0;

Greetings, Oli

0
 
LVL 1

Expert Comment

by:Oli2
ID: 1362868
add the above code after you're finished with your Memoobject.add thing.

so, f.e.:

procedure FirstLine;
var x: Integer;
begin
 for x := 0 to 20 do Memoobject.Lines.Add ( 'Line: ' + IntToStr ( x ) );
 Memoobject.SelStart := 0;
 Memoobject.SelLength := 1;
 Memoobject.SelLength := 0;
end;

Greetings, Oli
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now