Autoresizing Label

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

How might I make a label automatically resize to fit the text inside it?
I don't see a property for it, is there a way I can figure out the text
size for myself?

Thanks,
Steve
 
Hi,

You can create your own Label class inherits from Label. Then in the
"TextChanged" event, you can call the Graphics.MeasureString method in
order to measure your string and resize your label.

BR


Fabien Decret
C# MCP
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/



Steve a écrit :
 

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

Similar Threads

Custum Control basic question 2
Data Labels Disappearing 0
expanding datagridview columns 2
resize of report preview 4
split view popup form has resize problems 2
Auto Resizing labels 2
VGA or not VGA 1
PowerPoint powerpoint text Overflow 0

Back
Top