Posted by member 71746 on 2003-11-04 01:02:43 link

Ok so I've gotten around the problem by using systray-lsbox.dll and an LsBox as an anchor for the systray. The image of the systray is the LsBox image, and the systray's background is just a solid color that matches the color of the area in the box image where the systray sits. (Hope that made sense to everyone)

Now here's the complicated bit. To enable auto-sizing, I employed the following systray.rc:

SystrayOnAdd !TrayAddIcon
SystrayOnDel !TrayRemoveIcon


...also the script vars TrayWidth and TrayPos, pre-defined either in a startup script or in a vars.rc file, and the following script:

*Script bang !TrayAddIcon
*Script exec !varAdd TrayWidth 20
*Script exec !varAdd TrayPos -20
*Script exec !LsBoxResize TrayBox %{TrayWidth} 29
*Script exec !LsBoxMoveBox TrayBox %{TrayPos} -55
*Script ~bang

*Script bang !TrayRemoveIcon
*Script exec !varAdd TrayWidth -20
*Script exec !varAdd TrayPos 20
*Script exec !LsBoxResize TrayBox %{TrayWidth} 29
*Script exec !LsBoxMoveBox TrayBox %{TrayPos} -55
*Script ~bang


Hope this helps anyone else trying to overcome this little problem :)