How to have a field expand or shrink to the maximum size of the field?