drawing custom button in cocoa
drawing custom button in cocoa
- Subject: drawing custom button in cocoa
- From: "orochi_huang" <email@hidden>
- Date: Thu, 2 Jan 2003 18:22:49 +0800
I want to draw a custom shape button in my cocoa program,so I created a custom view in Interface Builder and subclassed NSButton to recevie mouse click action,I overwrited the drawRect: function to make myself shape.the shape shows correct,but when I click region outside the shape but in the rect of button,button click actions as if the mouse is in the shape region,I noticed it is because I filled the rect only,but not the region.But I didn't found anything in Cocoa can create a region from paths and rects,so how I can create custom button in cocoa?
_______________________________________________
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.