Screen location of NSToolbarItem
Posted
by adib
on Stack Overflow
See other posts from Stack Overflow
or by adib
Published on 2010-04-05T05:01:34Z
Indexed on
2010/04/05
5:03 UTC
Read the original article
Hit count: 326
How can I get the on-screen location of a button in a toolbar? That is getting the rectangle frame of an NSToolbarItem
? The [NSToolbarItem view]
method seems to always return nil
whenever the toolbar item is only a simple action button and thus I couldn't use the normal NSView
methods to pinpoint the toolbar button's on-screen position.
Background
I'm trying to use Matt Gemmell's MAAttachedWindow
component to point to a specific toolbar button. The component requires an NSPoint
object to "point" the user to a location on the screen.
Thanks in advance.
© Stack Overflow or respective owner