> What does the code you're using look like? (Also, are you on 10.9?)

The following works for me from 10.6 to 10.9 (I've left out code that
creates an NSSearchField, NSPopUpButton and NSTextField controls - all look
the same):

- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar
itemForItemIdentifier:(NSString *)itemIdentifier
willBeInsertedIntoToolbar:(BOOL)flag
{
        NSToolbarItem *toolbarItem = nil;

        if ([itemIdentifier isEqualToString:kPrintControl])
        {
                NSButton *control = [[NSButton alloc] init]; // Print
NSButton
                [control setTarget:self]; [control
setAction:@selector(menuPrintDocument:)];
                control.bezelStyle = NSTexturedRoundedBezelStyle;
control.buttonType = NSMomentaryPushInButton;
                control.toolTip = NSLocalizedString(@"PrintDocumentToolTip",
@"Tooltip");
                control.image = [NSImage imageNamed:@"Icon-Print-Template"];
                toolbarItem = [[NSToolbarItem alloc]
initWithItemIdentifier:kPrintControl];
                [control sizeToFit]; toolbarItem.view = control;
        }
        else // ...

        return toolbarItem;
}

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to