Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine width of autosized labels
Message
From
02/10/1997 14:07:26
 
 
To
02/10/1997 13:20:09
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00052771
Message ID:
00052902
Views:
35
>>Hi Tony!
>>
>>What do you mean? Each visible object has the Width property (even if
>>Autosize=.t.) that contains its actual width...
>>
>>>How can you determine the width of an autosized label???
>
>For some reason the width of an autosized label is always
>equal to the original width of the label.....
>
>I'm implimenting a better messagebox() and need to determine the
>width of autosized labels....in order to size the form itself...
>
>Help?!?
>
>Thanks, Tony

Just a simple example...

Form.Init() looks like the following
PARAMETERS cText

LOCAL nTextWidth

THIS.Text.Caption = cText
THIS.Text.Autosize = .T.
nTextWidth = THIS.Text.width


At this point nTextWidth is always equal to the original width of the
Label (at design-time).

The Label is autosized correctly on the screen but the
autosize does not seem to update the width property....
Previous
Reply
Map
View

Click here to load this message in the networking platform