Sets the preferred text field width used by Auto Layout.
- macOS 10.8–10.10Deprecated
The preferred width.
The preferred width is reflected in the cell's
cell, which will be large enough to accommodate the title, bezel, and a text field of width preferredTextWidth. It is also reflected in the
intrinsic of the form. That is, under Auto Layout, the form will try to size itself so that the text field cell is the given width, according to the usual content size constraint priorities.
If the width is negative, the
cell matches the historic behavior, which is that it is large enough to accommodate the title, bezel, and the current text.
The preferred width is reflected in the cell's cellSize, which will be large enough to accommodate the title, bezel, and a text field of width
This method can aid migration to Auto Layout, and is sufficient for simple cases. However, for new apps, use
NSText objects directly instead of
The default is -1.