Sizing text to fit a rectangle

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

I have a status panel that is predefined size, but the string I display in
it can vary in size.
How do I check the physical length of my string against the width of the
status panel so I can modify my text to fit the panel

TIA

Tony
 
* "Tony said:
I have a status panel that is predefined size, but the string I display in
it can vary in size.
How do I check the physical length of my string against the width of the
status panel so I can modify my text to fit the panel

'Graphics.MeasureString' will give you the size of the string.
'Graphics.DrawString' will allow you to soecify a layout rectangle in an
overloaded version.
 
Back
Top