General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only