setLength:
ステータスバーでのステータス項目の長さ(ピクセル)をセットします
-(void)setLength:(float)aFloat:
解説
ステータスバーでのステータス項目の長さ(ピクセル)をセットします。
その他の定数として
● NSSquareStatusItemLength ステータスバーの厚さ
● NSVariableStatusItemLength ステータス項目の大きさ
があります。
返り値
( void )
なし
引数
( float )aFloat
長さ
フレームワーク
ApplicationKit
クラス
NSStatusItem
Instance Methods
使用可能
10.0
参照
- length
- statusItemWithLength: (NSStatusBar)
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSStatusBar *sBar = [NSStatusBar systemStatusBar]; NSStatusItem *sItem = [sBar statusItemWithLength:NSVariableStatusItemLength]; [sItem retain]; [sItem setTitle: NSLocalizedString(@"SB_title",@"")]; [sItem setHighlightMode:YES]; [sItem setMenu:sbMenu]; [sItem setLength:NSSquareStatusItemLength]; NSLog([NSString stringWithFormat:@"%.1f",[sItem length]]); } @end