No offense, Dave -- you've been very generous with your time and advice (while also, of course, satisfying your own curiosity :)) -- but I personally would use I. Savant's original "too dirty" suggestion, which can be implemented in three lines:

@implementation MyButton

- (void)drawRect:(NSRect)rect
{
    [[self cell] setEnabled:YES];
    [super drawRect:rect];
    [[self cell] setEnabled:NO];
}

@end


It would make sense to uncheck the button's "Enabled" box in IB, but with this solution you don't even have to do that.

Granted, I haven't tried all permutations, but this is what I would have started with.

--Andy

On Jan 12, 2009, at 4:27 PM, Dave DeLong wrote:

While my answer may be "best", now that I know what you're planning to do with it, I would still suggest that you use something like Brandon's BWToolkit. Your phobia of third-party controls will just make life difficult for you. For example: you just spent 10 hours trying to replicate a gradient bar, when you could've spent 20 minutes downloading Brandon's toolkit, installing it, restarting IB, then dragging and dropping in a gradient toolbar yourself, and it would've behaved in exactly the same way with no measurable difference in performance.

Dave

On Jan 12, 2009, at 2:06 PM, Donnie Lee wrote:

No, Michael, that was a simple technical question. Dave's answer was
the best. He even helped me with focus workarounds. Some people told
me something like "Don't do it because I don't like that you do it.
Your app will always suck...etc.etc." -- that absolutely don't disturb
me, that are their personal problems.
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/aglee%40mac.com

This email sent to [email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to