Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When is autocenter not autocenter
Message
 
 
À
02/04/2003 14:22:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00772234
Message ID:
00773354
Vues:
16
Hi Barry,

Setting AutoCenter property to .T. centers the form, setting it to .F. doesn't change form position. Changing AutoCenter property to .F. after form is instantiated is to late because it's already centered. If you want to controll AutoCentering, you've to set AutoCenter to .F. in the class from which you create your form.

>Thsnks for the reply Sergey.
>
>Run this code snippet and let me know what you think
>
>Public oFormRef As Object
>
>m.oFormRef = CreateObject( [FirstLevelSubclass] )
>With m.oFormRef
>
>	.Caption = [Instance of First Level Subclass with AutoCenter False]
>	.Width = Len(.Caption)*Fontmetric(6)
>	.AutoCenter = .F.
>	.Show()
>
>EndWith && This
>
>Return .T.
>
>Define Class FirstLevelSubclass AS MyHighestFormClass
>
>	*   AutoCenter is not changed from default
>	Name = [FirstLevelSubclass]
>	
>EndDefine
>
>Define Class MyHighestFormClass AS Form
>
>	Name = [Myhighestformclass]
>	AutoCenter = .T.
>	
>EndDefine
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform