smorgan , , , - setBorder:YES .
, , :
#import <Foundation/Foundation.h>
@interface InstructionsTextFieldCell : NSTextFieldCell {
}
@end
#import "InstructionsTextFieldCell.h"
@implementation InstructionsTextFieldCell
- (id)init
{
self = [super init];
if (self) {
}
return self;
}
- (void)dealloc
{
[super dealloc];
}
- (NSRect)drawingRectForBounds:(NSRect)rect {
NSRect rectInset = NSMakeRect(rect.origin.x + 10.0f, rect.origin.y + 10.0f, rect.size.width - 20.0f, rect.size.height - 20.0f);
return [super drawingRectForBounds:rectInset];
}
- (id)initWithCoder:(NSCoder *)decoder {
return [super initWithCoder:decoder];
}
- (id)initImageCell:(NSImage *)image {
return [super initImageCell:image];
}
- (id)initTextCell:(NSString *)string {
return [super initTextCell:string];
}
@end
(, , , , , , , .x.)
, , awakeFromNib /, :
InstructionsTextFieldCell *newCell = [[InstructionsTextFieldCell alloc] init];
[newCell setBordered:YES];
[newCell setBezeled:YES];
[self.tfSyncInstructions setCell:newCell];
[newCell release];