FROM : Joachim Deelen
DATE : Tue Nov 20 22:11:23 2007
Hi Fabian,
I'm currently working on an application, using a NSStatusItem with a
custom view. With the following I can get the origin of the NSStatusItem
NSRect rect = [[[statusItem view] window ] frame];
Since I'm on a 24" iMac, the origin is about x=1525 y=1178
I don't know if this works, if you don't use a custom view.
regards
Joachim
Am 19.11.2007 um 23:14 schrieb [nexUmoja] Fabian Jäger:
> Hey guys,
> is there a way to get the position of an NSStatusItem in the
> system's menubar? At the moment I use the following hack:
>
> @implementation NSStatusItem (Hack)
> - (NSRect)hackFrame
> {
> return [_fWindow frame];
> }
> @end
>
> But unfortunately I only get (-34.0, 0.0) as the position, which
> does not seem like screen-space coordinates :(
>
> Fabian
> nexUmoja.org
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
DATE : Tue Nov 20 22:11:23 2007
Hi Fabian,
I'm currently working on an application, using a NSStatusItem with a
custom view. With the following I can get the origin of the NSStatusItem
NSRect rect = [[[statusItem view] window ] frame];
Since I'm on a 24" iMac, the origin is about x=1525 y=1178
I don't know if this works, if you don't use a custom view.
regards
Joachim
Am 19.11.2007 um 23:14 schrieb [nexUmoja] Fabian Jäger:
> Hey guys,
> is there a way to get the position of an NSStatusItem in the
> system's menubar? At the moment I use the following hack:
>
> @implementation NSStatusItem (Hack)
> - (NSRect)hackFrame
> {
> return [_fWindow frame];
> }
> @end
>
> But unfortunately I only get (-34.0, 0.0) as the position, which
> does not seem like screen-space coordinates :(
>
> Fabian
> nexUmoja.org
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| [nexUmoja] Fabian… | Nov 19, 23:14 | |
| Joachim Deelen | Nov 20, 22:11 | |
| Joachim Deelen | Nov 20, 22:57 | |
| [nexUmoja] Fabian… | Nov 20, 23:03 | |
| Joachim Deelen | Nov 20, 23:34 | |
| [nexUmoja] Fabian… | Nov 20, 23:59 | |
| Peter Maurer | Nov 22, 09:09 | |
| [nexUmoja] Fabian… | Nov 22, 11:37 | |
| Joachim Deelen | Nov 23, 23:26 | |
| [nexUmoja] Fabian… | Nov 24, 03:18 |






Cocoa mail archive

