SetSystrayWidth

Mac OSX specific forum
User avatar
mk-soft
Always Here
Always Here
Posts: 5398
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

SetSystrayWidth

Post by mk-soft »

Change Systray width for Mac OS
I missing SysTrayID, but you can get it over IsSystrayIcon. (PB-Internal)

Code: Select all

; PB-Internal
Macro SystrayID(Systray)
  PeekI(IsSysTrayIcon(Systray))
EndMacro

Procedure SetSystrayWidth(Systray, Width)
  Protected StatusItem, ItemLength.cgfloat
  ItemLength = Width
  StatusItem = CocoaMessage(0, SystrayID(Systray), "retain")
  CocoaMessage(0, StatusItem, "setLength:@", @ItemLength)
EndProcedure
:wink:
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: SetSystrayWidth

Post by deseven »

If you don't want to calculate anything you can use NSVariableStatusItemLength (-1) as a width.
Post Reply