Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Autosize programmatically
Message
From
24/07/1998 01:01:17
 
 
To
23/07/1998 07:25:47
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00120363
Message ID:
00120873
Views:
16
In order to have the Autosize effective, the label must be visible and the screen should NOT be locked. Since you say in an other message that you work with screen locked, this is the problem.

As for the Autosize combined with Wordwrap: if WordWrap is .f., than the label adjusts its width. If WordWrap is .t., than the label keeps the width and adjusts its height.

Another case when the Autosize seems to not work is when Autosize, Wordwrap, Caption or any other property that changes the label's size in the Init of the form. The behavior may seem random since sometimes the label is displayed correctly and sometimes it's not. My explanation is that during the Init of the form the real visible status (not the visible property) of the label is undefined, so, sometimes is .t., sometimes is .f. I have seen no cases when the Autosize will not work after the init of the form (assuming that the label is visible and the form is not locked).

Vlad

>I have a label control with AutoSize = .T. I am setting the Caption property programmatically, but the width is not changing (as you might expect with AutoSize = .T.)
>
>Is AutoSize for interactive change only, or do I need to do something else to make it work.
>
>TIA
>
>Rex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform