Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

problem with TMEMO

Posted on 1999-01-22
2
Medium Priority
?
233 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 200 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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

971 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