Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: Pageframe.resize event fails to read new width (height)
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
BUG: Pageframe.resize event fails to read new width (height)
Divers
Thread ID:
00925675
Message ID:
00925675
Vues:
63
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform