Word Wrap on a Label?

beans4you
03-06-2003, 11:41 AM
I have a label which I'm displaying as if it's a textbox. The text however always does a Word Wrap if it doesn't fit in the label. I have tried setting label.WordWrap property to both true and false but I still get the same result.

Is there any way to turn the Word Wrap off?

- Eric :confused:

Machaira
03-06-2003, 12:29 PM
What do you mean by using a label "as if it's a textbox"? A textbox is used for user input, a label displays information. You can resize the Label to only display one line after setting the caption, but it seems as if you're using the Label for the wrong purpose.

beans4you
03-06-2003, 12:44 PM
See Attached JPG:

The Instrument Group, Sub Group, and Instrument Name are all labels, but I have their properties set so that they look like textboxes. I read somewhere that this was a good practice to do this when you don't want to give the client the option to edit the control, because a label has a lower overhead than a textbox. However, as you can see in the JPG the Instrument Name label is Word Wrapping.

Machaira
03-06-2003, 02:08 PM
If a control looks like a textbox then a user will invariably try to edit it and wonder why the app doesn't work correctly when he can't. If a control is not supposed to be edited don't make it look like a textbox or use a disabled or locked textbox (although I wouldn't do this personally). As for overhead, you can pretty much ignore it as it's usually trivial unless you're talking about hundreds of controls.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum