• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Toolbar View Item Size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Toolbar View Item Size


  • Subject: Toolbar View Item Size
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Mon, 15 Dec 2008 14:39:06 +0700

Toolbar Programming Topics for Cocoa -> Setting a Toolbar Item’s Size says about view items:

"The minSize and maxSize toolbar must not be left unset (or the view will not display), and unless you are implementing intelligent stretching behavior in a view item, both theminSize and maxSize properties should equal the size of the item’s view."

My toolbar has NSButtons as views. And I would like to have small (or mini) sized buttons, when "Use Small Size" is selected and regular sized buttons otherwise.

But toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: is only called once. It is not called again, when the "Use Small Size"-flag changes.

So how can I implement "intelligent stretching behavior" to get appropriate sized buttons?


Another, slightly related problem:
[ myButton setBezelStyle: NSTexturedRoundedBezelStyle ];
[ myButton setTitle: name ];
//[ myButton setFont: [ NSFont controlContentFontOfSize: 0.0 ] ]; // 12 pt.; default
//[ myButton setFont: [ NSFont labelFontOfSize: 0.0 ] ]; // 10 pt.
[ myButton sizeToFit ];
always returns a button-height of 25 (the width varies with the font used).


Is this the correct and expected behaviour?


Kind regards,

Gerriet.

_______________________________________________

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


  • Prev by Date: Re: Where is the Computer Image ?
  • Next by Date: Re: Core Data: following a relationship to set a transient attribute during awakeFromFetch
  • Previous by thread: Re: Where is the Computer Image ?
  • Next by thread: Write to file.
  • Index(es):
    • Date
    • Thread