• 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
Re: NSView in a toolbar item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >NSView in a toolbar item (From: David Aames <email@hidden>)

  • Prev by Date: Re: Is it archiving/unarchiving NSBezierPath object to disk a performance issue?.
  • Next by Date: not getting colorlist
  • Previous by thread: NSView in a toolbar item
  • Next by thread: not getting colorlist
  • Index(es):
    • Date
    • Thread