Solved

problem with TMEMO

Posted on 1999-01-22
2
224 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 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