Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar
Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar
- Subject: Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar
- From: Richard Charles <email@hidden>
- Date: Fri, 16 Oct 2015 14:57:40 -0600
> On Oct 16, 2015, at 1:24 AM, Jacek Oleksy <email@hidden> wrote:
>
> NSToolbar is not a view, it is a class designed to "provide the
> mechanism for a titled window to display a toolbar just below its
> title bar" (from the doc). I need to display the toolbar in different
> place, that is why I need to use custom NSView (please correct me if I
> am wrong…).
Yes, you will need to roll your own toolbar.
> NSToolbarItem is not really a superview (it's not a view at all
> AFAICT). And yes, I know the containing frame can be resized, but I
> need to set the visual appearance of the button (or make it behave
> like in NSToolbar).
Yes that is also correct, NSToolbarItem also inherits from NSObject not NSView. It would appear that Apple did this on purpose to encourage standardization of toolbars on the Mac platform.
If you want equivalent functionality you will most likely need to roll your own toolbar and toolbar item.
> Still, I have no idea why the 22 vs 24px :/
It’s points not pixels. User interface elements are resolution independent.
--Richard Charles
_______________________________________________
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