Menu
  • HOME
  • TAGS

Delphi tray icon (NSStatusItem) for OSX

osx,delphi,nsstatusitem,nsstatusbar

Got it to work like this: type IFMXTrayItem = interface(NSObject) ['{7d2e4b38-61d9-4cf4-b78b-5f7c4188e9c0}'] procedure call_mymethod; cdecl; end; later edit: Added a GUID to the interface after reading this: This GUID is used by the compiler to identify uniquely this interface. Strictly speaking, you can use an interface without the GUID, but you...

How to access NSStatusBar from another view?

objective-c,nsstatusbar

I'm not quite sure what your question is, but in the old days you could call -popStatusItemMenu on your `NSStatusItem instance to show a menu (particularly in a view action such as your openRightWindow:): https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSStatusItem_Class/index.html#//apple_ref/occ/instm/NSStatusItem/popUpStatusItemMenu: If it's a problem of getting access to your instance of the status item, I...

NSStatusItem reordering along Status Bar

objective-c,osx,nsstatusitem,nsstatusbar

What you are looking for is NSMenuExtra and not NSMenuItem. Apple uses NSMenuExtra for the system menu icons including Wi-Fi and Bluetooth. Although it looks similar to the regular NSMenuItem, NSMenuExtra has some special features, notably to keep their relative order after rebooting, and Command-Draggable by user. Unfortunately, NSMenuExtra is...