Fixing textbox width

Let's avoid deprecated methods as well