Keeping constant width while changing label of NSToolbarItem
Keeping constant width while changing label of NSToolbarItem
- Subject: Keeping constant width while changing label of NSToolbarItem
- From: Andy Klepack <email@hidden>
- Date: Tue, 15 Sep 2009 17:22:34 +0000
- Thread-topic: Keeping constant width while changing label of NSToolbarItem
I'd like to create a toolbar item similar to the "Mount/Unmount" item in DiskUtility. Depending on the context the label will be set to a value describing the action. For DiskUtility it is "Mount" or "Unmount".
This is easy enough, the problem is that the different label lengths cause the toolbar to resize as the widths change. Visually not the nicest experience.
Is there a good way to set the minimum width of an item so that when a shorter label is swapped in the toolbar does not compress (or expand when a longer label is later set)? Playing with the minSize hasn't had the effect I expected.
Thanks,
-Andy
_______________________________________________
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