Re: NSView in a toolbar item
Re: NSView in a toolbar item
- Subject: Re: NSView in a toolbar item
- From: Apparao <email@hidden>
- Date: Mon, 18 Sep 2006 16:08:46 +0530
I think you've missed out, the tool bar item size setting. Use
setMaxSize and setMinSize methods to set size.
[ item setMaxSize:NSMakeSize(32.0f, 32.0f)];
[ item setMinSize:NSMakeSize(32.0f, 32.0f)];
- Apparao.
On 18-Sep-06, at 1:28 PM, David Aames wrote:
Hello all,
I've been trying to display a custom view in a toolbar item and for
some unknown reason the item just doesn't want to render the view.
Here's the code which I'm using:
NSToolbarItem *item = [[NSToolbarItem alloc]
initWithItemIdentifier:itemIdentifier];
[item setLabel:@"Search Field"];
NSLog(@"Search field view: %@", searchField);
[item setView:searchField];
return [item autorelease];
searchField is a an outlet to a NSSearchField. I've also tried
using another custom view instead of the search field and it still
doesn't render the view. I'm doing something really stupid but I
cannot realize what it is. Any hints are greatly appreciated.
Kind regards,
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40effigent.net
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