• 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: Custom View in Toolbar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom View in Toolbar


  • Subject: Re: Custom View in Toolbar
  • From: Gregory Weston <email@hidden>
  • Date: Tue, 09 Mar 2010 17:58:18 -0500

Paul Sanders wrote:

> Gregory Weston wrote:
>
>> I just sat down and attempted to accomplish what you're describing. It took 15 minutes and well under a dozen lines of code.
>
> Care to share your code?  As someone who develops on both Windows and Mac, I know how hard the transition can be.
>
> Paul Sanders.

Scott's (understandably) declared the thread done, but in the interest of closure ...

1 line to return the allowed list of items
1 line to return the default list of items
3 lines to allocate an NSToolbarItem, set its view and return it.

All done. I've got a tool bar item that is a view containing two buttons. It draws fine and the buttons are responsive.

Certainly it's a degenerate case, but that's a good place to go when you're experiencing unexpected behavior. Build from there and figure out where reality deviates from expectation.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5
  • Next by Date: Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5
  • Previous by thread: Re: Custom View in Toolbar
  • Next by thread: Displaying two different sub-entities in one table view
  • Index(es):
    • Date
    • Thread