• 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
nstoolbaritem coordinates?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nstoolbaritem coordinates?


  • Subject: nstoolbaritem coordinates?
  • From: Luc Vandal <email@hidden>
  • Date: Fri, 19 Aug 2005 11:17:11 -0400

Hi,

I'm creating some custom nstoolbaritem with a view attached so that I can be notified when the mouse is over a particular item. The problem that I have right now is that I can't find how to get the coordinates (rect or frame) for a toolbar item so how can I know where to initialize the view?

Here's the code that I'm using now. It works but the frame does not correspond to the toolbar item since I don't know how to get it:

NSToolbarItem *toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdent] autorelease];
view = [[VRToolbarItemView alloc] initWithFrame:NSMakeRect (0,0,500,500)];
NSTrackingRectTag tag = [view addTrackingRect:NSMakeRect( 0, 0, 500, 500 ) owner:view userData:nil assumeInside:NO];
[toolbarItem setTarget: view];
...
[toolbarItem setView:view];
...


If someone could bring up some code sample that would be really appreciated.

Luc
_______________________________________________
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


  • Follow-Ups:
    • Re: nstoolbaritem coordinates?
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Finding the 'best' size for a webView
  • Next by Date: Re: nstoolbaritem coordinates?
  • Previous by thread: NSPopUpButton Crashing When NSBackgroundColorAttributeName Is Set
  • Next by thread: Re: nstoolbaritem coordinates?
  • Index(es):
    • Date
    • Thread