Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Label not changing width
Message
From
04/10/2001 09:06:24
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00564006
Message ID:
00564082
Views:
13
Thanks Vlad

Kev
>Hi!
>
>Set _VFP.AutoYield to .T. for this code fragment, or use DOEVENTS command before getting the width of the label. When VFP do not process events, label will not be auto-resized until VFP gets a chanse to process events (either waiting state for input, DOEVENTS command or _VFP.AutoYield=.T. to process only certain events between code lines). DOEVENTS in VFP6 have a bug that cause application delay for 0.3 seconds, in VFP7 this bug is fixed.
>
>HTH.
>
>>Hi
>>
>>I am trying to add a Label to _SCREEN and then centering it, but when I go to center the Label, it's width is incorrect.
>>
>>ie
>>
>>
>>_Screen.NewObject("lblTitle", "Label")
>>
>>WITH _Screen.lblTitle
>>     .Caption = "Application Title Here"
>>     .FontSize = 16
>>     .AutoSize = .T.
>>     .Left = (_Screen.Width / 2) - (.Width / 2)
>>     .Height = (_Screen.Height / 2) - (.Height / 2)
>>     .Visible = .T.
>>ENDWITH
>>
>>
>>When I get to the
.Left
part of the program, the width is incorrect on the Label, it seems that only when it's made visible it will change.
>>
>>Is there a way around it - by the way this happens on every label, not just labels on the _Screen.
>>
>>Any ideas?
>>Thanks
>>Kev
Previous
Reply
Map
View

Click here to load this message in the networking platform