• 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
Re: Easy Question / Complicated buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Easy Question / Complicated buttons


  • Subject: Re: Easy Question / Complicated buttons
  • From: Stéphane Sudre <email@hidden>
  • Date: Fri, 27 Jul 2001 18:25:59 +0200

I wil do it with one button:

To know which part of the button is clicked or to clip the drawing of the Pushed images, you create 4 NSBezierPath.

When the user click in your view, you try to find if the click lies in on of the 4 paths with - (BOOL)containsPoint:(NSPoint)point;

(The problem is the separation area between button-parts.)

To draw the pushed stated, you just have to have one image which you're going to draw clipped with the appropriate path.


  • Prev by Date: Easy Question / Complicated buttons
  • Next by Date: Re: Runtime class info in ObjC/Cocoa
  • Previous by thread: Easy Question / Complicated buttons
  • Next by thread: Simple IB Question...
  • Index(es):
    • Date
    • Thread