NSToolbar Problem
NSToolbar Problem
- Subject: NSToolbar Problem
- From: Julian Cain <email@hidden>
- Date: Fri, 1 Apr 2005 08:30:06 -0500
Hello,
I have created a subclassed NSButton which I have in an NSToolbar, however when I run the customization palette the button image goes blank on the palette and toolbar. My Button code looks like so:
#import "SSTBButton.h"
@implementation SSTBButton
- (void)encodeWithCoder:(NSCoder *)coder {
[super encodeWithCoder:coder];
}
- (id)initWithFrame:(NSRect)frame {
if( ( self = [super initWithFrame:frame] ) ) {
SSTBButtonCell *cell = [[SSTBButtonCell alloc] init];
//[cell setImage[self cell] image]];
[cell setAttributedStringValue:[[self cell] attributedStringValue]];
[cell setTarget:[[self cell] target]];
[cell setAction:[[self cell] action]];
[cell setAlignment:[[self cell] alignment]];
[cell setTitle:[[self cell] title]];
[cell setShowsBorderOnlyWhileMouseInside:YES];
[cell setBordered:YES];
[self setCell:cell];
[cell release];
[self resetTrackingRect];
return self;
}
return nil;
}
- (id)initWithCoder:(NSCoder *)coder {
if( ( self = [super initWithCoder:coder] ) ) {
}
return self;
}
- (void)dealloc {
_trackingRectTag = nil;
[super dealloc];
}
- (void)drawRect:(NSRect)rect {
[super drawRect:rect];
}
- (void)mouseDown:(NSEvent *)event {
[self highlight:YES];
[self display];
[super mouseDown:event];
}
- (void)mouseUp:(NSEvent *)event {
[self highlight:NO];
[self display];
[super mouseUp:event];
}
Thanks in advance,
~Julian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden