Solved

problem with TMEMO

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

12 Experts available now in Live!

Get 1:1 Help Now