Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Category:
Coding, syntax & commands
>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
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