Custom sizing of flexible space toolbar item à la Mail.app
Custom sizing of flexible space toolbar item à la Mail.app
- Subject: Custom sizing of flexible space toolbar item à la Mail.app
- From: Daniel Dickison <email@hidden>
- Date: Sat, 23 Jun 2007 11:35:55 -0400
The leftmost flexible space toolbar item in the default Mail.app
setup sizes itself so that its right edge lines up with the edge of
the source list in the main content view. While I don't currently
have a need for that, I've become really curious about how this is
implemented.
My first guess was that a custom view gets set for the left-most
NSToolbarFlexibleSpaceItem when it's added via the delegate method
for toolbarWillAddItem:, so as to override the behavior for that
particular flexible item. But I can't figure out how a
NSToolbarItem's custom view can impose a certain size on the toolbar.
So maybe what's happening is that whatever object created the toolbar
holds on to the leftmost NSToolbarFlexibleSpaceItem NSToolbarItem,
and whenever the source list is resized it calls setMinSize: and
setMaxSize: on that toolbar item. Would this work?
There's another problem, though: how do you get the leftmost flexible
item in a given toolbar?
Just curious,
Daniel
_______________________________________________
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