Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted
Yes, the amount of chars will vary unless you use a font where the chars have a fixed width like courier new or lucida console, in which case you can use the Graphics.MeasureString() function to figure out how many chars you can fit.
[sIGPIC]e[/sIGPIC]
Posted

Thanks for the info.

 

Finally I use "Courier New 9 pt" and estimate the # of chars by

 

nChar = textbox.Width / 10; // 10 pixel for a "Courier New 9 pt" letter

 

The result is not very accurate, but fine for me.

 

Thanks again for all your help.

 

Michael

There is no spoon. <<The Matrix>>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...