Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine a wrapped word label's height?
Message
From
25/09/2006 10:17:37
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01155729
Message ID:
01156909
Views:
30
>I think the problem might be that you're assigning the caption before the container is done with its Init in that case. IOW, the container hasn't been instantiated yet, so you can't change its height. You can check this by seeing what you get back from THIS.HEIGHT in the container's Init before you try to assign the caption.

Ok, I tried assigning the caption in a custom method of the form. By that time, the containers' Inits are complete correct? Still a no go :(

Interestingly, check this out. I've put a container on a form. In that container I put a label with Autosize=.T., Wordwrap=.T., Caption="Test". I sized the label's width to 80 (narrow enough to force a wordwrap to occur when I set the caption later). In the form's Init, I set the label's Caption="This is a long caption to test the wordwrap feature".

From the debugger, when I step thru the form's init to check the label's height, it starts out at 17, the default. After the caption is changed to the longer one, the height is still 17. It does not seem to know that the wordwrap took place. Bug?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform