nstoolbaritem coordinates?
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