int size = 5; int finalWidth = size* txtBox.Text.Length; txtBox.Width = new Unit(finalWidth); You'll need to change size to be how big you want to allow per letter.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)