Stop Labels Wrapping Text

B

Buddy

Hello,

Does anyone know how to stop labels from wrapping text. If
the text is to long for the label then I want it to hide
the text just like out the TextBox control works.

Thanks,
 
J

Jeffrey Tan[MSFT]

Hi Buddy,

The actual size of the font is not fixed, so it is hard to determine
the length of the string.
I think the best way to work around is using textbox instead of label
control.
You can follow the steps bellow to let the textbox display almost like a
label control:
1.set its wordwrap property to false
2.set its BorderStyle property to None.
3.set its ReadOnly property to true
4.set its Cursor property to Default or Arrow

Hope this helps
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Buddy" <[email protected]>
| Sender: "Buddy" <[email protected]>
| Subject: Stop Labels Wrapping Text
| Date: Fri, 12 Sep 2003 00:08:45 -0700
| Lines: 7
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcN4/LSH3COj3PZkSq20qsq1jMkRQg==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:184306
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hello,
|
| Does anyone know how to stop labels from wrapping text. If
| the text is to long for the label then I want it to hide
| the text just like out the TextBox control works.
|
| Thanks,
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top