LinkLabel Size

F

Foehammer

Hello,
I'm trying to find a way to determine the size of the text in a
LinkLabel. I want it to automatically resize itself. Other controls
have a ContentsResized event, but the LinkLabel is sadly lacking. Any
ideas? I was thinking that I could create a Graphics object from the
control and call MeasureString to get the size of its text - when
would be the best time to do this?

Will
 
H

Herfried K. Wagner [MVP]

Foehammer said:
I'm trying to find a way to determine the size of the text in a
LinkLabel. I want it to automatically resize itself.

Set its 'AutoSize' property to 'True'.
 

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

Top