Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: Anchor vertical center with odd height
Message
De
08/03/2005 07:49:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00993310
Message ID:
00993582
Vues:
12
>It's not a bug. Your assumption that shape is centered horizontaly from the beginning is incorrect.

Where I have written this ???????

>The shape center is one pixel closer to the top border of the form than to the bottom.

Sergey, please,
run the code with NNHEIGHT 1, 2 and 3, 4
With 2 it is ok,
with 1 it is not moved
with 3 it is moved to a incorrect position
with 4 it is correct
......


>
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform