drawingRectForBounds:
セルを描画する矩形を返します
-(NSRect)drawingRectForBounds:(NSRect)theRect:
解説
セルを描画する矩形を返します。theRectからわずかに内側
返り値
( NSRect )
セルの範囲
引数
( NSRect )theRect
範囲
フレームワーク
ApplicationKit
クラス
NSCell
Instance Methods
使用可能
10.0
参照
- calcSize (NSControl)
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSRect rec = [bCell1 drawingRectForBounds:NSMakeRect(0,0,100,100)]; NSLog([NSString stringWithFormat:@"x=%.1f,y=%.1fw=%.1f,h=%.1f",rec.origin.x,rec.origin.y,rec.size.width,rec.size.height]); } @end