Hi Agnes,
how about only working with PageHeight? If you specify the minimum pageheight everything should work ok. Or do you have a special need to specify the minimum height of the pageframe itself?
HTH,
Armin
>Hi all,
>
>How can I calculate the difference between Pageframes HEIGHT and PAGEHEIGHT?
>
>Let me show you the situation:
>
>I change Pageframes Height via code
>
>
>thisform.pgfFrame.Height = 200
>
>
>The RESIZE event of the pageframe tries to check minheight etc. and stop the thing shrinking. If there is a limit the height should stop at this.
>
>This looks like
>
>with this
>lnMinheight = max(.calculate_minheight(),.minheight)
>
>if lnMinheight>.pageheight
>.HEIGHT = lnMinheight+Offset_Between_Height_And_PageHeight
>endif
>...
>
>
>So the problem is to get
Offset_Between_Height_And_PageHeight.
>
>My first try was to calculate
>
>...
>Offset_Between_Height_And_PageHeight = .height-.pageheight
>...
>
>
>but this will result in cruel results.
>
>If I trace the calculation, I can see that Pagheight is on new value something smaller then 200, but height stucks on the old one (350 in this example).
>
>So my idea now is to calculate
Offset_Between_Height_And_PageHeight from the bottom (with things like Borderwidth), but I have no idea what may be nedded for a right value.
>
>
>Thank you for your ideas
>
>Agnes