Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2012, 08:21 AM
adriantc adriantc is offline
Senior Member
 
Join Date: Feb 2007
Posts: 142
Default Autoscrolling memo up & down

Hello,

I have a memo object displaying a sort of credits and I need it to scroll up and once it gets down to scroll up again and so on. I know that I can scroll up and down with ScrollBy (using a timer event), but how can I tell it has reached the end or the beginning?

Thank you,
Adrian
Reply With Quote
  #2  
Old 08-23-2012, 07:47 PM
emailx45 emailx45 is offline
Junior Member
 
Join Date: May 2012
Posts: 18
Thumbs up

Try verify the LINE or COLUMN current


var line,Column:integer;
begin
With Memo1 do
begin
Line:= Perform(EM_LINEFROMCHAR,SelStart, 0);
Column:= SelStart - Perform(EM_LINEINDEX, Line, 0);
end;
Label1.Caption:=IntToStr(line)+\' - \'+IntToStr(Column)
Reply With Quote
Reply

Tags
autoscroll, credits, scroll, tmemo

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:25 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.