Generally, you’ll use Interface Builder to modify the appearance of a form. But you can also modify it programmatically, with the methods described here.
Use these NSForm methods to set the appearance of all the entries in a form:
To set the font of the entries’ titles or text fields, use setTitleFont: or setTextFont:.
To set the alignment of the entries’ titles or text fields, use setTitleAlignment: or setTextAlignment:., with one of these as the argument: NSRightTextAlignment, NSCenterTextAlignment, or NSLeftTextAlignment.
To set the spacing between entries (in pixels), use setInterlineSpacing:.
To set the width of the entries (including their titles and text fields), use setEntryWidth:.
To set how the text fields are outlined, use setBordered: and setBezeled:. A border is a thin line around the field. A bezel is an outline shaded to look three-dimensional. If both of these are set to NO, then the text fields are not outlined.
Use the NSFormCell methods in the following list to set the appearance of one of the entries in a form. You can access a particular entry with cellAtIndex:; for example, [myForm cellAtIndex:1].
To set the font of an entry’s title or text field, use setTitleFont: or setTextFont:.
To set the alignment of the entries’ titles or text fields, use setTitleAlignment: or setTextAlignment:., with one of these as the argument: NSRightTextAlignment, NSCenterTextAlignment, or NSLeftTextAlignment.
To set the title of an entry, use setTitle:. If you want the title to contained styled text, use setAttributedTitle:.
Last updated: 2002-11-12