[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2007-11-27
4
Medium Priority
?
269 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
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

873 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