Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Controlling ScrollBar in RichEdit

108 views
Skip to first unread message

sam

unread,
Mar 5, 2001, 5:35:40 AM3/5/01
to
 
Hi,  is there any way to control ScrollBars in RichEdit? I need to get position of the ScrollBars. I already tried to put RichEdit inside a ScrollBox and set Align alClient. There was just more problems. ScrollBars range is supposed to be 32-bit Integer, but if I set range over 16-bit area, the RichEdit inside the ScrollBox just dissapers. Could anyone help me?

Kees Willem van der Meer

unread,
Mar 5, 2001, 6:47:30 AM3/5/01
to

sam <ko...@st.jyu.fi> schreef in berichtnieuws
3AA36BFC...@st.jyu.fi...

No need for the scrollbox. You can use GetScrollInfo and SetScrollInfo from
the Windows-unit and pass the richedit's handle as the first parameter.
Like:

var Info: TScrollInfo;

GetScrollInfo (RichEdit1.Handle, SB_HORZ, Info)// get info from horizontal
scrollbar


Kees Willem


Peter Below (TeamB)

unread,
Mar 5, 2001, 3:29:10 PM3/5/01
to
In article <3AA36BFC...@st.jyu.fi>, Sam wrote:
> Hi, is there any way to control ScrollBars in RichEdit?

Define "control" in this context. YOu can get the first line on display
(a proxy for the scrollbar position) by sending a
EM_GETFIRSTVISIBLELINE to the control, you can get it to scroll by
a certain number of lines by sending it EM_LINESCROLL messages.


Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.

0 new messages