Re: How do I make a flexible NSToolbarItem?
Re: How do I make a flexible NSToolbarItem?
- Subject: Re: How do I make a flexible NSToolbarItem?
- From: "I. Savant" <email@hidden>
- Date: Thu, 7 Sep 2006 14:46:17 -0400
Please post the relevant code so people can review and comment.
--
I.S.
On Sep 7, 2006, at 10:49 AM, PGM wrote:
Hi everybody
My app has a toolbar in which I would like to have a view with a
searchbox that stretches automatically, like the one SearchBoxes in
most Apple apps. The documentation says about sizing NSToolbarItem:
"If a view item’s view does something intelligent when it is
stretched, then you will set its maxSize greater than its minSize
in height, width, or both. Horizontally-stretchable view items,
including the Flexible Space standard item, compete equally for
available horizontal space."
The question now rises: how do I make my view do "something
intelligent"?
In Interface Builder, I have set my view to be flexible. And I have
implemented NSToolbar's toolbarWillAddItem: to set the
maxSize.width of my view to 2000 and the minSize.width to 51.
However, my searchbox and an adjacent NSToolbarFlexibleSpaceItem do
NOT compete equally for space; my searchbox is huge and the
flexibleSpace is tiny. Furthermore, when I customise my toolbar,
the customisation sheet shows the searchBox is the same huge size
as it is in the toolbar and not in the small size that you see for
the searchbox when you customise a toolbar in an Apple app. Has
anybody succeeded in getting this to work as it should? Serachboxes
are becoming increasingly popular, so I would guess that people
have struggled with this before.
Thanks in advance, Patrick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden