I'm using a TRichViewEdit (ver 1.9.15) as a single-line edit box and preventing word wrap w/ the following code:
for i := 0 to RVStyle1.ParaStyles.Count-1 do
RVStyle1.ParaStyles.Options := RVStyle1.ParaStyles.Options+[rvpaoNoWrap];
RichView1.Reformat;
(which works great)
However I am able to scroll the text in the box vertically about one-half of a line using the up and down arrow keys.
How do I prevent this vertical strolling?
Thanks!
TRichViewEdit as a single line edit box
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
FYI : I have been fighting this (small) problem for hours ... Finally found 2 ideas, maybe one of them is suffcient :
- Setting RV.ClientHeight to DocumentHeight+VSmallStep+1
- Adding RV.ScrollTo(0) in various events (key handler, OnChange). In your case, maybe you could use the OnCaretGetOut event.
- Setting RV.ClientHeight to DocumentHeight+VSmallStep+1
- Adding RV.ScrollTo(0) in various events (key handler, OnChange). In your case, maybe you could use the OnCaretGetOut event.