Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PageFrame Height & Pageheight
Message
From
18/09/2002 01:05:28
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00701189
Message ID:
00701620
Views:
21
Good Morning Armin,
>Hmmm ... I think doing ...
>
>
>thisform.pageframe1.Height - thisform.pageframe1.PageHeight
>
>
>worked for me some time ago. Yes, just made a test (VFP7SP1).

The problem with height holding the wrong value occurs when the Resize is called from forms init only It's rare but I can reproduce in VFP6 SP2 as well as in VFP7 SP1.

>...
>The first code returns 30 in my test, the second 26. It seems that you should add some extra pixels for the borders.

It' simple 2*borderwidth or {if it runs::)} .width-.pagewidth
This is all a mystery. I played around with pageframe in the morning, but it will be more worst then before.

Something to test:

open a plain form, add a plain pageframe. Select Page1, change fontsize to 20. Do see increasing the whole size of the pageframe? I've had the same problem with a pageframe with variable captions on pages, where TabStretch is set to
2. It looks like the object tries to keep PageHeight instead of Height

I Start now with a test on changing tabs before reading height, possibly this solves the problem and put height to right value.

This is my test:
<pre>
WITH THIS
 THISFORM.LOCKSCREEN = True
 lnWidth  = MAX(.MINWIDTH, .PAGEWIDTH)
 lnHeight = MAX(.MINHEIGHT,.PAGEHEIGHT)

 llOldTabs = .TABS
 .TABS     = !.TABS
 .TABS     = llOldTabs
 lnOffsetHeight = .HEIGHT-.PAGEHEIGHT
 lnOffsetWidth  = .WIDTH -.PAGEWIDTH
 ASSERT lnOffsetHeight>0 MESSAGE 'Dimension - Problem in Pageframe Resize'
 ASSERT lnOffsetWidth>0 MESSAGE 'Dimension - Problem in Pageframe Resize'

 IF .PAGEHEIGHT<lnHeight THEN
  .HEIGHT = lnHeight+lnOffsetHeight
 ENDIF &&.PAGEHEIGHT<lnHeight
 IF .PAGEWIDTH<lnWidth THEN
  .WIDTH = lnWidth+lnOffsetWidth
 ENDIF &&.PAGEWIDTH<lnWidth


...
I will see if this works better. I will notice you about the results.

Thank you for your help

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform