I would like to have the text of a label resize to fit the label control
itself. I understand that the other way around is possible, i.e. having the
control resize to display the text (autosize property) but I can not seem to
find any sample or technique suitable for what I need. My label control is
set to fill a resizable form and I would like the text to scale as the form
is resized.
Thanks,
Sid. 4 1176
Sid,
Just the Dock in my idea as it is in every control.
If that does not fit your problem, than the Anchor
Use it in the designer properties first than you get an idea,
I hope this helps,
Cor
"Sid Price" <si*@nowhere.comschreef in bericht
news:Os**************@TK2MSFTNGP03.phx.gbl...
>I would like to have the text of a label resize to fit the label control itself. I understand that the other way around is possible, i.e. having the control resize to display the text (autosize property) but I can not seem to find any sample or technique suitable for what I need. My label control is set to fill a resizable form and I would like the text to scale as the form is resized.
Thanks,
Sid.
My first thought was that you need to find the nearest font size to suit the
label height but this might then be too wide for the label.
I am afraid I don't have time to do this, but you could have a look at GDI+.
I would then use a Panel to draw the text on and I would look at the
StringFormat object to help do it. Top of my head this. Use Help for mo
info.
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:Ox**************@TK2MSFTNGP03.phx.gbl...
Sid,
Just the Dock in my idea as it is in every control.
If that does not fit your problem, than the Anchor
Use it in the designer properties first than you get an idea,
I hope this helps,
Cor
Thanks for the response Cor, this is exactly what I am doing. My label
control automatically fits the panel as it is resized. However, my question
was related to resizing the text on the label as the control itself is
resized.
Sid.
Sid,
Just simple, don't do it, the result becomes ugly.
(You have to work with font settings, but it never fits)
Cor
"Sid Price" <si*@nowhere.comschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:Ox**************@TK2MSFTNGP03.phx.gbl...
>Sid,
Just the Dock in my idea as it is in every control.
If that does not fit your problem, than the Anchor
Use it in the designer properties first than you get an idea,
I hope this helps,
Cor
Thanks for the response Cor, this is exactly what I am doing. My label
control automatically fits the panel as it is resized. However, my
question was related to resizing the text on the label as the control
itself is resized.
Sid. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nel |
last post by:
I have a question related to the "security" issues posed by Globals ON.
It is good programming technique IMO to initialise variables, even if it's
just
$foo = 0;
$bar = "";
Surely it would...
|
by: Craig Bailey |
last post by:
Anyone recommend a good script editor for Mac OS X?
Just finished a 4-day PHP class in front of a Windows machine, and liked
the editor we used. Don't recall the name, but it gave line numbers as...
|
by: Chris |
last post by:
Sorry to post so much code all at once but I'm banging my head against
the wall trying to get this to work!
Does anyone have any idea where I'm going wrong?
Thanks in advance and sorry again...
|
by: James |
last post by:
My form and results are on one page.
If I use :
if ($Company) {
$query = "Select Company, Contact
From tblworking
Where ID = $Company
Order By Company ASC";
}
|
by: Alan Walkington |
last post by:
Folks:
How can I get an /exec'ed/ process to run in the background on an XP box?
I have a monitor-like process which I am starting as
'exec("something.exe");' and, of course the exec function...
|
by: John Ryan |
last post by:
What PHP code would I use to check if submitted sites to my directory
actually exist?? I want to use something that can return the server
code to me, ie HTTP 300 OK, or whatever. Can I do this with...
|
by: Beowulf |
last post by:
Hi Guru's,
I have a query regarding using PHP to maintain a user profiles list. I
want to be able to have a form where users can fill in their profile
info (Name, hobbies etc) and attach an...
|
by: Lothar Scholz |
last post by:
Because PHP5 does not include the mysql extension any more is there
a chance that we will see more Providers offering webspace with
Firebird or Postgres Databases ?
What is your opinion ? I must...
|
by: joost |
last post by:
Hello,
I'm kind of new to mySQL but more used to Sybase/PHP
What is illegal about this query or can i not use combined query's in mySQL?
DELETE FROM manufacturers
WHERE manufacturers_id ...
|
by: presspley |
last post by:
I have bought the book on advanced dreamweaver and PHP recently. I
have installed MySQL and PHP server but am getting an error on the
$GET statement show below. It says there is a problem with...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
| |