don't call textfield.textwidth twice