trichview.com

trichview.support




Re: automatic scrolling puts the richview into view


Return to index


Author

Message

Daniel Zimmerman

Posted: 11/23/2004 4:52:17


Thanks, Michel  

I had already tried overriding the AutoScrollInView (to simply do

nothing), and that seemed to solve my problem.  It looks like you've

tried some more sophisticated things as well, so i'll look to see if it

might be applicable to my case too.


Thanks,

Daniel


> I have solved this as follows : In the parent scrolling frame, I have

> overloaded the AutoScrollInView method, so that when argument AControl

> is the RVEdit it applies a particular processing instead of the

> ihnerited one. This particular processing consists in getting the

> caret coordinates within the RVEdit, and scrolling the Parent window

> only as necessary to keep the caret visible.

> Note: to get optimal comfort, I also introduced top and bottom

> scrolling thresholds, corresponding approximately to the height of 3

> text lines. This is ok when the caret move is initiated by an arrow

> key. But it should be disabled (set to 0) in case caret move is

> initiated by a mouse click (test "csLButtonDown in

> ActiveControl.ControlState"), otherwise it can cause an undesirable

> Extend-Selection effect.

>

> Of course, all this implies that the internal layout of this "parent

> frame" always ensures that the RVEdit is fully visible at this level.

> In my case, the layout is done by adusting the height or the RVE to

> DocumentHeight (plus some extra, to avoid transcient scrolling

> effects), after each change of the RVE content.

>





Powered by ABC Amber Outlook Express Converter