Instance Method

setButtonType:

Sets the button’s type, which affects its user interface and behavior when clicked.

Declaration

- (void)setButtonType:(NSButtonType)type;

Parameters

aType

A constant specifying the type of the button. The available button types are listed under NSButtonType in the NSButtonCell class.

Discussion

This method causes the button to update to reflect the new type before the method finishes executing.

The types available are for the most common button types, which are also accessible in Interface Builder. You can configure different behavior with the NSButtonCell methods highlightsBy and showsStateBy.

Note that there is no -buttonType method. The set method sets various button properties that together establish the behavior of the type.

See Also

Configuring Buttons

- getPeriodicDelay:interval:

Returns by reference the delay and interval periods for a continuous button.

- setPeriodicDelay:interval:

Sets the message delay and interval periods for a continuous button.

alternateTitle

The title that the button displays when the button is in an on state.

attributedTitle

The title that the button displays in an off state, as an attributed string.

attributedAlternateTitle

The title that the button displays as an attributed string when the button is in an on state.

title

The title displayed on the button when it’s in an off state.

- setTitleWithMnemonic:

Sets the title of a button with a character denoting an access key.

Deprecated
sound

The sound that plays when the user clicks the button.

springLoaded

A Boolean value that indicates whether spring loading is enabled for the button.

maxAcceleratorLevel

An integer value indicating the maximum pressure level for a button of type NSMultiLevelAcceleratorButton.