473,769 Members | 6,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7881

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***@OnlineWo rk.com>
| Sender: "Buddy" <Bu***@OnlineWo rk.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/LSH3COj3PZkSq20 qsq1jMkRQg==
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| Path: cpmsftngxa06.ph x.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1843 06
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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
3479
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 the value of the label, and working on the assumption that the <label for="???" links to the <select id="???" Below is the html that I am working from, which has been dynamically created. Unfortunately I have no control over this at all. I...
11
11522
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): _ Apples are my favorite fruit _ Pomegranates are my favorite fruit _ Oranges are my favorite fruit
2
13935
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 sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. <br /> visit website
4
9276
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 scroll bars appearing. Basically replicating notepad with word wrap switched on. Maybe this isnt possible? Any help will be much appreciated.
2
1482
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 send as a parameter ,... so Please , help me ,.. cause it doest work ! '---------------------------------------------------------- --------------
2
6525
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, I don't like how the labels wrap and would like to prevent them from wrapping, but I don't see a property that applies to this. How can I keep the labels on one line? Thanks! Matt
0
1141
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 { WHITE-SPACE: nowrap } </style>
3
1512
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 working fine on separate, new controls) and then I noticed the wrapping. I removed the AJAX but they are still wrapping. Please advise. Thanks.
1
1382
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 to the next line. I know there is a solution but can't find it under options Txs MikeY
0
9424
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8879
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.