473,396 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Stop Labels Wrapping Text

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,
Nov 15 '05 #1
1 7844

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" <Bu***@OnlineWork.com>
| Sender: "Buddy" <Bu***@OnlineWork.com>
| Subject: Stop Labels Wrapping Text
| Date: Fri, 12 Sep 2003 00:08:45 -0700
| Lines: 7
| Message-ID: <08****************************@phx.gbl>
| 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,
|

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martin O'Rourke | last post by:
All, I am hoping someone might be able to put me out of my misery and let me know if it is possible or not to dervie the name of an element in a form, based on its associated label, only knowing...
11
by: Jamie Jackson | last post by:
Two part question: 1) I'd like to do have nicely indented checkbox labels, even where wraps occur (for instance, the way <li> wrapping works). So, I'd like this (where "_" = checkbox): _...
2
by: Suzanne Boyle | last post by:
I have the following code in a webpage: <p><img src="images/clydesdale.gif" width="100" height="41" style="float: left;" /> <strong>Test</strong><br /> Lorem ipsum dolor sit amet, consetetur...
4
by: Web Team | last post by:
Hi All, I'm trying to stop text from wrapping in a span, so that my users can enter content with out the box stretching across the screen when they reach the edge of it, and with out horizontal...
2
by: Giovane Calabrese | last post by:
( aspx + vb ) hi everyone ! I really need make that function work ! im brazilian , and i want to make a multilanguage system , that function above must look at all ASPX take the labels ID and...
2
by: MattB | last post by:
Hi I have a form with a CheckBoxList that gets bound at runtime. I split it into columns if there are a lot of items, but the formatting of those columns isn't what I was looking for. Specifically,...
0
by: Dan | last post by:
Unfortunately the property in Wrap="false" for a datagrid adds nowarp="false" to the TR not the TD. So to stop text wrapping in a Datagrid in asp.net do the following Add: <style> TD {...
3
by: bpd | last post by:
The text in my labels are now wrapping at runtime when they were not previously. In design mode, the text display fines. Did I accidentally change a setting? I implemented AJAX (appeared to be...
1
by: MikeY | last post by:
Hi Everyone, How do I stop my word wrapping with in my .Net Evironment.. While coding away, I pressed "something" and I lost my horizontal scroll bar, and now all my code has been word wrapped...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.