Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: Anchor vertical center with odd height
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
BUG: Anchor vertical center with odd height
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00993310
Message ID:
00993310
Vues:
58
I look this bug on VFP9 beta, today i have found a slice of free time for publish it.

Run this, and resize height:
* put 3, 5 , ... and the shape is moved, but the position is incorrect.
* Strangely, with an even number it is correct 

#DEFINE NNHEIGHT 1
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form

	Top = 0
	Left = 0
	Height = NNHEIGHT 
	Width = 375
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT shape1 AS shape WITH ;
		Left = 48, ;
		Height = NNHEIGHT , ;
		Width = 100, ;
		Anchor = 512, ;
		Name = "Shape1"


	PROCEDURE shape1.Init
		DEBUGOUT "start centered",this.top+INT(this.height/2),INT(thisform.height/2)
	ENDPROC


	PROCEDURE shape1.Move ( nLeft, nTop, nWidth, nHeight )
		DEBUGOUT "expected equal",nTop+INT(m.nHeight/2),INT(thisform.height/2)
	ENDPROC

ENDDEFINE
Fabio
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform