Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When is autocenter not autocenter
Message
 
 
To
02/04/2003 14:22:52
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00772234
Message ID:
00773354
Views:
15
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform