Page 1 of 1

TTreePage.Count error

Posted: Wed Feb 16, 2005 5:50 pm
by 9235787
In TTreePage.Count the number of pages uses the TTree's TotalBounds to calculate the number of pages. It uses the ROUND function that inflates the actual number of pages due to rounding. The SetPage correctly sets the page using the DIV functions. The result is that the TreeNavigator and Printing ends up having multiple blank pages.

Any ideas how to get around this bug?

Posted: Wed Mar 09, 2005 6:12 pm
by Tom
Hi,

you could change the code in to using DIV

result:=1+(ITree.IBounds.Bottom div FHeight);

Thanks for reporting the bug.

Regards,
tom

Posted: Wed Mar 09, 2005 6:13 pm
by Tom
I meant:

You could change the code in TTreePage.InternalGetCount