trichview.com

trichview.support




Re: DocumentHeight Question


Return to index


Author

Message

Sergey Tkachenko

Posted: 07/02/2002 18:06:48


You can just set rv.VScrollVisible = False, and it should solve all

problems.



> Well, that kind of fixes it, but then you have a lot of extra space

> underneath.  In my application, I'm stacking RichViews, so the extra space

> is ugly and will probably be not acceptable to my customer.

>

> I've been looking into it and I discovered a few things.

>

> 1.  When you call TRVScroll.UpdateScrollBars from

> TRichViewRVData.SetDocumentAreaSize you pass in YS based on the the

> DocumentHeight.

>

> 2.  In side UpdateScrollBars the ScrollPage is calculated from

ClientHeight

> and ScrollMax is calculated from the Passed in YS value that was based on

> DocumentHeight.

>

> 3.  Windows hides the scrollbars whenever ScrollMax < ScrollPage and shows

> them when ScrollMax >= ScrollPage (the way I understand it).

>

> 4. In my code I set the ClientHeight = DocumentHeight, but when you step

> through the code, you can see that afterwards ClientHeight and

> DocumentHeight are not the same.  Which means that you're calculating

> ScrollMax and ScrollPage base on different things.

>

> 5.  One thing that I noticed that if I removed the "+1" from call to

> UpdateScrollBars in TRichViewRVData.SetDocumentAreaSize, it helped.

> However, as you resize the width there are cases when the scroll bar will

> show.

>

> My experience tells me that this is not caused by roundoff error.  It has

> something to do with the fact that I set ClientHeight to DocumentHeight,

but

> after that's done the ClientHeight is not equal to the DocumentHeight.

It's

> wierd.

>

> Any help would be appreciated.

>

> Thanks,

> Mark DeMichele

> If you want I can probably slap together a simple test from to demonstrate

> the problem.






Powered by ABC Amber Outlook Express Converter