Scale the width of a toolbarFlexibleSpace (like in Mail.app)
Scale the width of a toolbarFlexibleSpace (like in Mail.app)
- Subject: Scale the width of a toolbarFlexibleSpace (like in Mail.app)
- From: Axel <email@hidden>
- Date: Sat, 5 May 2007 16:09:32 +0200
Hi everyone,
I am trying to implement a toolbar item similar to the first flexible
space of Mail.app, that scales it width according to an nsplitview
subview width.
The idea is to set the width of the item using the NSSplitView
delegate method (void)splitViewDidResizeSubviews:(NSNotification*)
notification. When called, this method checks if the first toolbar
item identifier is NSToolbarFlexibleSpaceItemIdentifier and calls -
(void)setMaxSize:... But -(void)setMaxSize: doesn't seem to work on
NSToolbarFlexibleSpaceItemIdentifier.
My current solution is to create a custom toolbar item, use an empty
NSView and assign it to the item. This works but doing this I will
have two allowed items (NSToolbarFlexibleSpaceItem and my custom
space item) where Mail.app manage to have only one.
Has anyone of you managed to do this in his app? Can someone give me
some hint?
Cheers
Axel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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