• 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: Tiger Mail.app style toolbar item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tiger Mail.app style toolbar item


  • Subject: Re: Tiger Mail.app style toolbar item
  • From: Ryan Britton <email@hidden>
  • Date: Mon, 26 Dec 2005 21:01:41 -0800

That control is not available as-is as far as I know. I assume you're talking about the combo one like the Reply/Reply All/Forward one since the other one can be done with just a normal NSButton instance. The closest thing to the combo one is NSSegmentedControl, but it lacks several of the attributes of the control used in Mail, particularly the shape and the mouse-over highlight.

http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSSegmentedControl.html

If you do want the shape (which I do like better), then you'll have to implement your own control. You may be able to get by with subclassing NSSegmentedCell and using that custom cell for an NSSegmentedControl, which saves you from having to handle the mouse- tracking code.

http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSSegmentedCell_index.html

For the mouse-over highlight as well, I believe you're stuck doing it all. You'll need to implement a subclass of NSActionCell or NSSegmentedCell for drawing the button itself and handling mouse updates. See this for doing that:

http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSCell.html#//apple_ref/doc/uid/ 20000074-DontLinkElementID_228

Then just make an NSControl subclass that contains the necessary data structures and uses an instance of that cell. Make sure to add tracking rects for the mouse-over areas. This can be done, but it is not a trivial control to implement given that you have to track multiple areas within the same control for mouse events.


On Dec 26, 2005, at 8:39 PM, Eric Lin wrote:

Is the capsule-style toolbar item in OS 10.4's Mail.app available for
developers? If not, how would you guys suggest one go about
implementing it? In particular, what class to override, how to
implement the mouse over highlight and such? Sorry I'm new to Cocoa
and not very familiar with implementing custom views/controls.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Tiger Mail.app style toolbar item
      • From: Eric Lin <email@hidden>
References: 
 >Tiger Mail.app style toolbar item (From: Eric Lin <email@hidden>)

  • Prev by Date: Re: Tiger Mail.app style toolbar item
  • Next by Date: Re: Tiger Mail.app style toolbar item
  • Previous by thread: Re: Tiger Mail.app style toolbar item
  • Next by thread: Re: Tiger Mail.app style toolbar item
  • Index(es):
    • Date
    • Thread