Re: Custom View in Toolbar
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