Re: Problem with custom control in NSToolbar
Re: Problem with custom control in NSToolbar
- Subject: Re: Problem with custom control in NSToolbar
- From: Renaud Boisjoly <email@hidden>
- Date: Mon, 2 Aug 2004 23:42:30 -0400
Hi Laurent again!
I just checked and I actually have the same issue you have with this
code... the icon does not appear in the CUstomization palette... its
like the palette uses the original view from IB instead of one with the
NSPopupButton already present...
I'm wondering if I could use a dummy version of the button in IB with
the right icon, and remove it when I initialize my imagePopUpButton...
But can you explain how you got your menu to appear under the actual
button? My popupmenu appears below the main window... :-(
- Renaud
On 7-Jun-04, at 5:36 PM, email@hidden wrote:
Subject: Problem with custom control in NSToolbar
From: Laurent Daudelin <email@hidden>
To: Cocoa-Dev <email@hidden>
Hi all!
I have a problem which had me pulling my hairs for the last couple of
days.
I finally decided to ask here for help before I no longer have hairs
to pull
out!
Basically, I took the "ImagePopUpButton" class from
<http://iratescotsman.com/products/source/> to use it in a toolbar.
This is
a subclass of NSPopUpButton that reproduces the behavior of popup
toolbar
items in Xcode, for example.
After making some additions to the code (NSCoding protocol since
NSToolbar
seems to encode some items at some point), the popup button works fine.
However, when I choose to customize the toolbar, the icon doesn't show
up in
the customization palette. Only the title. If I remove the current
item from
the toolbar, then drag the one from the palette, it will appear
immediately.
I've checked everything I could think of, be it the min size of the
toolbar
item and its max size, the cellframe where the custom cell is
displaying
those icons, I can't for the life of me finding what is missing.
Anybody has any idea or ran into a similar issue? Code is available
upon
request to <mailto:email@hidden>.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.