?
Solved

I can't make scrollBar   procede with loding new text in memo

Posted on 2007-11-27
4
Medium Priority
?
262 Views
Last Modified: 2010-04-05
 I'm  reading text from .txt file in memo1.  With every new opening of the form am adding new text
 to become larger than memo window .  I have scroll bars to, but can't make memo show the last text.
 What must i do?
0
Comment
Question by:pr2501
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Expert Comment

by:rfwoolf
ID: 20360496
What do you mean? Just scroll down.Are you asking how to scroll down programmatically?
0
 

Author Comment

by:pr2501
ID: 20363865

On opening of the window the memo scroll bar  blue square rectangle is on the top of vertical  scrollbar rectangle.

have to make it to be on opening on the  bottom?
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 200 total points
ID: 20363940
a sample

procedure TForm1.Button1Click(Sender: TObject);
begin
  if opendialog1.execute then
  begin
    memo1.Lines.LoadFromFile(opendialog1.filename);
    memo1.SelStart := length(memo1.Text);
    memo1.Perform(EM_ScrollCaret,0,0);
  end;
end;

meikl ;-)
0
 

Author Comment

by:pr2501
ID: 20394772
Way can't make it work in next code?
procedure TForm2.Beri(Ime:string);
    var
          podatki1: textfile;
          vrstica: string;
  begin
     AssignFile(podatki1,Ime);
     Reset(podatki1);
     While not EOF (podatki1) do begin
     ReadLn(podatki1,vrstica);
     F.Memo1.Lines.Add (vrstica);
     end;
 
     F.  memo1.SelStart := length(memo1.Text);
     F.memo1.Perform(EM_ScrollCaret,0,0);
     CloseFile(podatki1);
 
  end;

Open in new window

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

801 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