setState:
ボタンの状態をセットします
-(void)setState:(NSInteger)value:
解説
ボタンの状態をセットします。
【value】
● NSOnState onにします。
● NSOffState offにします。
● NSMixedState Mixedにします(MixedStateがYESのとき)(-1)
onにします(MixedStateがNOのとき)
必要であれば、レシーバーを書き直します。
ボタンがMixedの状態を使うには、allowsMixedState:メソッドを使います。
返り値
( void )
なし
引数
( NSInteger )value
セットするボタンの状態(下記)
フレームワーク
ApplicationKit
クラス
NSButton
使用可能
10.0
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { [myOutlet setAllowsMixedState:YES]; [myOutlet setState:NSMixedState]; } @end