By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

Calculate pixel value based on textbox.text.length

P: 3
Hi There,

I am very new to .NET and VB so this may be a really simple thing to solve but here is my issue

I have a a textbox with a value in it. I know what the length of the text in the text box is. I would then like to set the width of the text box (in px) to an appropriate calculated value based on the length. So, if the text length is 50, I would need a text box of around 300px for the text to be shown without being truncated. Is there a method or formula to calculate this value?

Many Regards,
Mervyn (newbie)
Oct 24 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.