Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: Pageframe.resize event fails to read new width (hei
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00925675
Message ID:
00926949
Vues:
10
Hi Ben,

I can repro this bug in VFP9beta. As a workaround, you can use Move(0 method.
* Click method
WITH Thisform.pageframe1
	.Move(.Left, .Top, 100, .Height)
ENDWITH
>The bug has already been reported to MS. I put it here for the information of the community.
>
>Steps to Reproduce:
>
  • Create a blank form in VFP
    >
  • Put a pageframe control on to the form
    >
  • Put the following code into the resize event of the pageframe control:
    > Wait Window This.Height
    >
  • Put the following code into the click event of the form
    > Wait Window Thisform.pageframe1.Width
    > Thisform.pageframe1.height=100
    >
  • Run the form.
    >
  • Click on the form. The original width (241) of the pageframe will show at the right top
    >
  • Click on the wait widnow to resize the pageframe. The Width of the pageframe printed by the code inside the resize event will be shown at the right top. (100 is expected but it shows the old value 241)
    >
  • If we reproduce the behavior in code rather than in a visual form as follows. The values are correct shown.
>PUBLIC oform1
>oform1=NEWOBJECT("form1")
>oform1.Show
>DEFINE CLASS form1 AS form
>      ADD OBJECT pageframe1 AS pageframe With pagecount=2,width=241
>      PROCEDURE Click
>            Wait Window Thisform.pageframe1.Width
>            Thisform.pageframe1.Width=100
>      PROCEDURE pageframe1.Resize
>            Wait Window This.width
>ENDDEFINE
>
>
>Observed Behavior:
>
  • In a visual form, the resize event of a pageframe fails to report the correct width of the pageframe after resizing.
    >
  • If the form is define by code, the resize event of a pageframe reports the width of the pageframe after resizing correctly
    >

>Expecteded Behavior:
>In both visual and code defined forms, the resize event should report the width after resizing rather than the figure before resizing.
>
>Additional Information:
>Happens in 9.0 beta and earlier versions. Similar problem is found in both width and height.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform