I'd like to catch a Drag and Drop-operation with SysTrayIcon. Is this possible (on Mac OS X?).
If not, Drag and Drop-Support for SysTrayIcons would be some great enhancement!
Currently, I am fiddling around with this (edited) example from the docs:
Code: Select all
If OpenWindow(0, 100, 150, 300, 100, "PureBasic - SysTray Example", #PB_Window_SystemMenu)
CreateImage(0,16,16,32)
StartDrawing(ImageOutput(0))
Box(2,2,12,12)
StopDrawing()
AddSysTrayIcon(1, WindowID(0), ImageID(0))
; EnableGadgetDrop(1, #PB_Drop_Text, #PB_Drag_Copy) ; Can I do something about this?
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_SysTray
eventtyp = EventType()
If eventtyp = #PB_EventType_LeftClick
Debug "left click"
ElseIf eventtyp = #PB_Event_GadgetDrop
Debug "dropped"
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf