Dynamic width of textbox

How can you implement it? I also need it