The MaxLength property of the TextBox lets you set a maximum number of characters that the user can enter, no matter the width (it can be 10 m's or 10 i's). But if you set the TextBox to be, say, 100 pixels wide, and you want only 100 pixels of letters, be it 5 m's or 8 i's, it's a bit more difficult. As an option, try using the MaxLength property and making the TextBox wide enough. But if you absolutely need to allow only a certain width of characters, try getting the font of the control, and using some graphics function (MeasureString could be, I am no expert.) to measure the current contents plus the new character in the KeyDown event, and if the new text is wider than the control, don't accept the key. I hope to have given you some pointers. Good luck! -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!