Label Word Wrap

Started by Richard Marchessault, February 16, 2013, 04:35:08 PM

Previous topic - Next topic

Richard Marchessault

I have a label on a form where the text word wraps fine when viewed while the form is being designed. But when the application runs the text does not wrap. Any ideas?
Thanks,
Dick

Paul Squires

I am trying to replicate this behavior but I can not. Are you changing the height of the Label at run time thereby not giving it room enough to wrap? The only way that it would not wrap is if the SS_NOWORDWRAP style is checked in the WindowStyles properties for the Label.
Paul Squires
PlanetSquires Software

Richard Marchessault

I am not changing the height. The height is more than enough to support to lines of text. The text wraps fine when I enter it when the control is designed. However, when the program is running and new text is entered for the label, it does not wrap. I've tried many different settings and could not get it to work. Thought I would seek advice here. For now I have given up on this and am simply using a text box which wraps fine.

Also, I wanted to use FF_BrowseForFolder but that will not work. No problem entering it but every time it compiles, I get error messages. I searched the forums here and saw that others had had similar problems but I did not see a fix.
Thanks,
Dick

Paul Squires

I have noticed that if at run time you change the size of your label in WM_SIZE that then you will also need to re-apply the text to the label to ensure that it wraps correctly. I have had to do that in the FireFly application itself (in the PropertyList - the label that holds the description for each property).
Paul Squires
PlanetSquires Software

Richard Marchessault

No resizing is being done. Just changing the text for the label. The text truncates and does not wrap.
Thanks,
Dick