is there any way I can adjust the behavior of a Label when text overflows
it's boundaries?
I have a specific size Label which can show 2 lines of text, but on some
occassions the text I insert may be longer. On such occassion, you can see
the top of a third line of text just above the bottom border of the Label
(the text is cut off by the boundary of the LAbel)
I would rather have it not display this third line at all (stop printing
text onces a specific boundary is reached) but instead I have a ToolTip on
that Label which will show the entire text within the ToolTip.
So how do modify Label so it stops displaying text after 2 lines have been
used up? 2 4544
You can figure out how many display units there are in two lines of your
label, then dynamically figure out how many units in the text your posting
(as different fonts/sizes will matter), then cut it off at max units. Did
something like this once but don't remember the exact code to use.
--
William Stacey, MVP http://mvp.support.microsoft.com
"MrNobody" <Mr******@discu ssions.microsof t.com> wrote in message
news:52******** *************** ***********@mic rosoft.com... is there any way I can adjust the behavior of a Label when text overflows it's boundaries?
I have a specific size Label which can show 2 lines of text, but on some occassions the text I insert may be longer. On such occassion, you can see the top of a third line of text just above the bottom border of the Label (the text is cut off by the boundary of the LAbel)
I would rather have it not display this third line at all (stop printing text onces a specific boundary is reached) but instead I have a ToolTip on that Label which will show the entire text within the ToolTip.
So how do modify Label so it stops displaying text after 2 lines have been used up?
Hi thanks for your reply!
would you elaborate a bit more on "display units" ?
anything to do with getting rectangles that the text would fit in and
comparing it to rectangle of space available in the label?
"William Stacey [MVP]" wrote: You can figure out how many display units there are in two lines of your label, then dynamically figure out how many units in the text your posting (as different fonts/sizes will matter), then cut it off at max units. Did something like this once but don't remember the exact code to use.
-- William Stacey, MVP http://mvp.support.microsoft.com
"MrNobody" <Mr******@discu ssions.microsof t.com> wrote in message news:52******** *************** ***********@mic rosoft.com... is there any way I can adjust the behavior of a Label when text overflows it's boundaries?
I have a specific size Label which can show 2 lines of text, but on some occassions the text I insert may be longer. On such occassion, you can see the top of a third line of text just above the bottom border of the Label (the text is cut off by the boundary of the LAbel)
I would rather have it not display this third line at all (stop printing text onces a specific boundary is reached) but instead I have a ToolTip on that Label which will show the entire text within the ToolTip.
So how do modify Label so it stops displaying text after 2 lines have been used up?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Marek Mänd |
last post by:
<select multiple style="height:200px;">
<option>a
<option>b
</select>
Why does Mozilla draw the vertical scrollbar to the SELECT html element?
There is plenty of void room below two OPTIONs in the SELECT box, so
there is no need for that.
How do i get the overflow:auto like thing working in mozilla based
|
by: Brian Henry |
last post by:
I have a messaging application that has a data grid with information like an
email list would have (from, subject, time sent, size) but the subject
could be very long in theory, and then it would word wrap.. the subject is a
variable width column (resizes to fit space) while the others are fixed
size... the problem is that i dont want the text to ever word wrap.. but
truncate the visible subject to match the current cell width... (kinda...
|
by: Lars Netzel |
last post by:
Hi
On a developer computer I have built a small Form with a label telling the
user to press a "update" button on the same form. When the button is pressed
(on a user computer, not developer) a Messagebox will apear and give
information. This does not show the texts at all.. it instead shows a msgbox
which have the right amount of buttons and the size looks like it's taking
care of the textlength of the message but there are no texts...
|
by: jawolter |
last post by:
I have text that is too long to nicely fit on a given page, so I want
to add ellipses to the end that dynamicaly resize based on the person
resizing the page width. If you hover it would show the full text,
using a title attribute I believe.
It works for a div, but not a span... any ideas?
Here's a snippet that I'm working on:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
by: Graeme |
last post by:
Hi there
Yet another daft question.
Can I fill a css defined box with a text character such that the box can be
set to say, 85% page width, and the text character fills the bos to that
width, does not overflow?
Graeme
| |
by: Joe Delphi |
last post by:
Hi,
I want to position label text so that it always appears centered when
the user re-sizes the browser window.
I tried adding the HTML property text-align="CENTER" to the code,
but ASP.NET doesn't seem to recognize this HTML attribute.
Can someone tell me how to do this?
|
by: george.leithead |
last post by:
Hi all,
I have a very strange problem! In following Web page (which is
generated from a CMS System), the navigation to the left 'dissapears'
when you roll the mouse over the links? It does not do this in all
browsers either. I have found it to happen in IE 7 and the latest
patched IE 6. I have tried to find out the reason, but keep finding
strange behaviour! You will see at the bottom of the HTML, I have a
comment. If you follow...
|
by: GloStix |
last post by:
For some reason, FF likes to put a black underline on all my buttons.
No matter what I do, it has the line
I've tried displaying as block and cursor, anything..
Also I've been trying to get it so the entire block is clickable, not just the text.
I've sorta got it so it's clickable, just some parts of the button I still can't click on.
The website is http://pdhtdev.johnabbott.qc.ca/students/2010/james_mann/portfolio/index.htm
The css...
|
by: thomas.mertes |
last post by:
Is it possible to use some C or compiler extension to catch
integer overflow?
The situation is as follows:
I use C as target language for compiled Seed7 programs.
For integer computions the C type 'long' is used.
That way native C speed can be reached.
Now I want to experiment with raising a Seed7 exception
(which is emulated with setjmp(), longjmp() in C) for integer
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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,...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |