Ok, let's try again, using
http://www.mikeash.com/?page=pyblog/custom-nscells-done-right.html
as a guide and the fix suggested for nested cells, I came up with this
sub-class of a level indicator:
#import <Cocoa/Cocoa.h>
@interface VALevelIndicatorCell : NSLevelIndicatorCell {} @end
@implementation VALevelIndicatorCell
+ (Class)cellClass
{
return [VALevelIndicatorCell class];
}
- (void)drawWithFrame:(NSRect)frame inView:(NSView *)controlView
{
int i = (frame.size.height - [self cellSize].height)/2;
frame.origin.y += i;
frame.size.height -= i;
[super drawWithFrame:frame inView:controlView];
}
@end
While I find my draw method does get called, and the cell does get drawn
centered, no user interaction is possible.
This may or may not be related but I notice that the <go to counterpart>
button for my header goes nowhere, while viewing the .m sources does!
Short or rebuilding the class, is there a way to mend a counterpart's
linkage (header or source)?
--
/los "I was a teenage net-random"
>> Stay informed about: Vertically center (NSLevelIndicator) Cell?