Up

# NSForm

### Authors

Ovidiu Predescu (`ovidiu@net-community.com`)

> Form class, a matrix of text fields with labels

Copyright: (C) 1996 Free Software Foundation, Inc.

# Software documentation for the NSForm class

## NSForm : NSMatrix

> Declared in:
>   AppKit/NSForm.h

> Conforms to:
>   NSCoding

Availability: OpenStep
Description forthcoming.

Instance Variables
Method summary

- -_setTitleWidthNeedsUpdate:
- -addEntry:
- -cellAtIndex:
- -drawCellAtIndex:
- -indexOfCellWithTag:
- -indexOfSelectedItem
- -insertEntry:atIndex:
- -removeEntryAtIndex:
- -selectTextAtIndex:
- -setBezeled:
- -setBordered:
- -setEntryWidth:
- -setInterlineSpacing:
- -setTextAlignment:
- -setTextFont:
- -setTitleAlignment:
- -setTitleFont:

### _setTitleWidthNeedsUpdate:

- (void) _setTitleWidthNeedsUpdate: (NSNotification*)notification;
Availability: OpenStep
Warning the underscore at the start of the name of this method indicates that it is private, for internal use only, and you should not use the method in your code.

### addEntry:

- (NSFormCell*) addEntry: (NSString*)title;
Availability: OpenStep

Adds a new entry with title as its title at the end of the NSForm and returns the NSFormCell.

See Also: -insertEntry:atIndex: -removeEntryAtIndex:

### cellAtIndex:

- (id) cellAtIndex: (int)index;
Availability: OpenStep

Returns the NSFormCell at index index

See Also: [NSMatrix -cellAtRow:column:]

### drawCellAtIndex:

- (void) drawCellAtIndex: (int)index;
Availability: OpenStep

Draws the NSFormCell at the specified index

See Also: -cellAtIndex: [NSCell -drawWithFrame:inView:] [NSMatrix -cellFrameAtRow:column:]

### indexOfCellWithTag:

- (int) indexOfCellWithTag: (int)aTag;
Availability: OpenStep

Returns the index of the entry specified by aTag or -1 if aTag is not found in entries.

See Also: [NSMatrix -cellAtRow:column:]

### indexOfSelectedItem

- (int) indexOfSelectedItem;
Availability: OpenStep

Returns the index of the current selected entry.

[NSMatrix -selectedRow]

### insertEntry: atIndex:

- (NSFormCell*) insertEntry: (NSString*)title atIndex: (int)index;
Availability: OpenStep

Inserts a new entry with title as its title at the index index of the NSForm and returns the NSFormCell.

See Also: -addEntry: -removeEntryAtIndex:

### removeEntryAtIndex:

- (void) removeEntryAtIndex: (int)index;
Availability: OpenStep

Removes the entry at index index.

See Also: -insertEntry:atIndex: -addEntry:

### selectTextAtIndex:

- (void) selectTextAtIndex: (int)index;
Availability: OpenStep

Selects the text in the entry specified by index.

[NSMatrix -selectTextAtRow:column:]

### setBezeled:

- (void) setBezeled: (BOOL)flag;
Availability: OpenStep

Sets whether then NSForm's entries have bezeled border.

See Also: [NSCell -setBezeled:]

### setBordered:

- (void) setBordered: (BOOL)flag;
Availability: OpenStep

Sets whether then NSForm's entries have border

See Also: [NSCell -setBordered:]

### setEntryWidth:

- (void) setEntryWidth: (float)width;
Availability: OpenStep

Sets the width of all entries to width

See Also: [NSMatrix -setCellSize:]

### setInterlineSpacing:

- (void) setInterlineSpacing: (float)spacing;
Availability: OpenStep

Sets the spacing between all entries to spacing. By default the spacing is 4.

See Also: [NSMatrix -setIntercellSpacing:]

### setTextAlignment:

- (void) setTextAlignment: (int)aMode;
Availability: OpenStep

Sets the text alignment to aMode for all entries. See NSTextAlignment for more informations. The default text alignment is NSRightTextAlignment

See Also: -setTitleAlignment: [NSCell -setAlignment:]

### setTextFont:

- (void) setTextFont: (NSFont*)fontObject;
Availability: OpenStep

Sets the text font to fontObject for all entries

See Also: [NSCell -setFont:] -setTitleFont:

### setTitleAlignment:

- (void) setTitleAlignment: (NSTextAlignment)aMode;
Availability: OpenStep

Sets the text alignment of the title to aMode for all entries. See NSTextAlignment for more informations. The default title alignment is NSLeftTextAlignment

See Also: [NSFormCell -setTitleAlignment:] -setTextAlignment:

### setTitleFont:

- (void) setTitleFont: (NSFont*)fontObject;
Availability: OpenStep

Sets the text font of the title to fontObject for all entries

See Also: [NSFormCell -setTitleFont:] -setTextFont:

## Instance Variables for NSForm Class

### _title_width_needs_update

@protected BOOL _title_width_needs_update;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

Up