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
Solved

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi application Soap connection 5 120
Print Graphic and Text to Epson TM-T88v 12 380
Working with hours 3 65
When i run adoquery my application freezes 26 178
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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…

860 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