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


|