On Jul 26, 2011, at 8:09 AM, Christian Schmitz wrote:
> Am 24.07.2011 um 01:18 schrieb Tim Jones:
>
>> When dealing with the NSStatusItemMBS class elements, I've run into a
>> situation where my statusitem can exceed the available space on the
>> statusbar (either because my text is too long, or the user switched to an
>> application where the app menus take up most of the statusbar space. When
>> this occurs, Finder or the Windowsmanager starts hiding statusbar items.
>>
>> Is there any type of notification that an app can receive to know whene it's
>> statusmenu has been hidden?
>
> I don't think there is something official.
>
> It may be worth trying if you could use the Window reference we have on the
> statusitem. Maybe if you query the visible property there?
I tried that when I first found it, but it appears that even when the MenuItem
is hidden, the window's visible property is always True.
Here's my old code:
// s = my statusbaritem
s.Title = "Some Long Title that will cause the item to be hidden"
If Not s.Window.Visible Then
s.Title = "Some Shorter Version"
If Not s.Window.Visible Then
s.Title = "" // just show the icon
End If
End If
Am I misunderstanding how to access that property?
Thanks,
Tim
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info