• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
drawing custom button in cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: drawing custom button in cocoa
      • From: Mike Ferris <email@hidden>
  • Prev by Date: Re: straight-C DNS lookup with timeout?
  • Next by Date: Re: straight-C DNS lookup with timeout?
  • Previous by thread: Re: straight-C DNS lookup with timeout?
  • Next by thread: Re: drawing custom button in cocoa
  • Index(es):
    • Date
    • Thread