Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Components Usage > D6: richedit go...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 90 of 175
Post > Topic >>

D6: richedit goto line not working

by A man <uce@[EMAIL PROTECTED] > Dec 1, 2003 at 01:54 PM

D6 Personal edition, Win 2000.

I have some code to go to a richedit line number, the caret goes to the 
line but the richedit does not scroll so that line is visible. Is there 
a problem with this in Win 2000? 

Here is the code I'm using: 
s:=Inputbox('Enter line number','Line number','0');
i:=StrToInt(s);
if i>Richedit1.Lines.Count-1 then
    i:=Richedit1.Lines.Count-1;
//Does not scroll to line yet.
{with RichEdit1 do //Tried this also, did not work.
    begin
    SelStart := Perform(EM_LINEINDEX, i, 0);
    Perform(EM_SCROLLCARET, 0, 0);
    SetFocus;
    end; //with
    }
Richedit1.SelStart := SendMessage(Richedit1.Handle,
                             EM_LINEINDEX, i - 1, 0);


-- 
Freezone Freeware: 1100+ applications
http://chuckr.bravepages.com
http://chuckr.freezone.org
http://freezone.darksoft.co.nz
http://home.att.net/~chuckr30/index.html
 




 1 Posts in Topic:
D6: richedit goto line not working
A man <uce@[EMAIL PROT  2003-12-01 13:54:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 0:12:59 CDT 2008.