setAlignment:
アクションセルの中のテキストの配置をセットします
-(void)setAlignment:(NSTextAlignment)mode:
解説
アクションセルの中のテキストの配置をセットします。
【NSTextAlignment】
● NSLeftTextAlignment 左揃え
● NSRightTextAlignment 右揃え
● NSCenterTextAlignment センター揃え
● NSJustifiedTextAlignment ジャスティファイ
● NSNaturalTextAlignment 自動(初期設定)
NSNaturalTextAlignmentは文字の言語の自然な配置として、他の配置のうちの1つを使って表示されます。
返り値
( void )
なし
引数
( NSTextAlignment )mode
テキスト配置モード
フレームワーク
ApplicationKit
クラス
NSActionCell
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { // [but1 setTitle :@"title" ]; [but1 setAlignment : NSRightTextAlignment ]; } @end