Re: adding a new BezelStyle to buttons
Re: adding a new BezelStyle to buttons
- Subject: Re: adding a new BezelStyle to buttons
- From: Andrew Platzer <email@hidden>
- Date: Tue, 6 Jan 2004 16:42:25 -0800
On Jan 4, 2004, at 3:32 AM, Nicholas Francis wrote:
I'm looking for ways to add a new BezelStyle to the list currently
supported by NSButton & NSPopUpButton. I can easily live with not
being able to set it from IB, but would like to not have to create a
new Cell type and set the cell for all my controls from code.
Something like this would be nice:
static const int myBezelStyle = 9600; // Strange magic value
- (void) awakeFromNib {
[myButton setBezelStyle: myBezelStyle];
[myPopupButton setBezelStyle: myBezelStyle];
}
Would there be any way to catch this bezelStyle inside a cell's call -
(void)drawWithFrame:inView: and then check for the myBezelStyle?
I wouldn't recommend this. The bezel style is stored in only 4 bits (16
values) and Cocoa uses 0..9 right now. The others are reserved and
subject to use without notice. Using a value of 9600 would definitely
fail.
Besides, how would you do your custom drawing without subclassing
NSCell and overriding -drawWithFrame:inView:?
Andrew
_______________________________
Andrew Platzer
Application Frameworks
Apple Computer, Inc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.