Solved

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

Posted on 2007-11-27
4
259 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
oracle global variables 4 80
Controlled Assessment GCSE - desperate help needed 4 112
Delphi: ForceDirectory plain function 7 50
Find and Replace Stream with 0s 8 73
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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 a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

696 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