Instance Method

setImageScaling:forSegment:

Sets the image scaling mode for the specified segment.

Declaration

- (void)setImageScaling:(NSImageScaling)scaling forSegment:(NSInteger)segment;

Parameters

scaling

The scaling mode to assign to the specified segment. For the possible values, see NSSegmentStyle.

segment

The index of the segment whose image scaling mode you want to set. This method raises an exception (NSRangeException) if the index is out of bounds.

Discussion

The image scaling mode for a segment affects how the image inside the corresponding cell is positioned and resized when the cell itself grows or shrinks. The image scaling mode does not itself cause the cell to change size in any way. If a cell does not contain an image, the scaling mode has no effect.

See Also

Configuring Individual Segments

- setLabel:forSegment:

Sets the label for the specified segment.

- labelForSegment:

Returns the label of the specified segment.

- setImage:forSegment:

Sets the image for the specified segment.

- imageForSegment:

Returns the image associated with the specified segment.

- imageScalingForSegment:

Returns the image scaling mode associated with the specified segment.

- setWidth:forSegment:

Sets the width of the specified segment.

- widthForSegment:

Returns the width of the specified segment.

- setEnabled:forSegment:

Sets the enabled state of the specified segment

- isEnabledForSegment:

Returns a Boolean value indicating whether the specified segment is enabled.

- setMenu:forSegment:

Sets the menu for the specified segment.

- menuForSegment:

Returns the menu for the specified segment.

- setToolTip:forSegment:

Sets the tooltip for the specified segment.

- toolTipForSegment:

Returns the tooltip of the specified segment.

- setTag:forSegment:

Sets the tag for the specified segment.

- tagForSegment:

Returns the tag of the specified segment.