Help with Hooking in Xlabel Thread last updated on 2004-08-27 23:08:32

Posted by member 189895 on 2004-08-27 14:45:51

I have looked at the help files and I still can't do it.

I am trying to hook vtray and xtaskbar into xlabel.

Here is what I have for vtray config:
vtraySettingsCompatibility
systrayX -64
systrayY -54
systrayHeight 26
systrayIconSize 16
systrayIconSpacingX 6
systrayIconSpacingY 5
systrayDirection left
systrayBitmap systemtray.png
systrayBorderLeft 0
systrayBorderRight 0
systrayRememberIcons true
systraySnap true
systrayBordersize 5
systrayBorderColor ffffff
systrayBorderDrag true
systrayAutoSize
systrayAlwaysontop true
systrayOnAdd !systrayShow

and this is what I have for vtray in xlabel just for vtray:
*Label VtrayLabel
VtrayLabelAlwaysOnTop true
VtrayLabelLeftBorder 4
VtrayLabelRightBorder 4
VtrayLabelMoveable
VtrayLabelMoveModifierKey "ctrl"
vtraybitmap "systemtray.png"
vtrayLabelX -157
vtraylabely -84
VTrayLabelAddToGroup "100"
VTrayLabelX "15"
VTrayLabelY "0"
VTrayLabelWidth "95"
VTrayLabelHeight "25"
VTrayLabelImage "VTrayBox.png"
*vtrayLabelModuleHook !vTrayHook

I also added the line: *vtrayLabelModuleHook !vTrayHook to step.rc

Can anyone help me out. Thanks.

Posted by member 32550 on 2004-08-27 15:27:25 link

tray and taskbar loaded before xLabel?
also xtaskbarloadinbox set?
always on top doesn't make any sense in tray. cause when you hook anything, it will be always on top of the label!!!

and ... erm...
vtrayLabelX -157
vtraylabely -84
VTrayLabelAddToGroup "100"
VTrayLabelX "15"
VTrayLabelY "0"

2 times x and y???? doesn't make sense too
and another thing is:
VTrayLabelWidth "95"
VTrayLabelHeight "25"
you positionates the tray:
systrayX -64
systrayY -54
so this one is OUT OF THE IMAGE!!!!
like in lsBox, if you hook you HAVE TO USE the in-box coordinates and not the desktop cords.
a hooked tray on a label left top corner is
vtrayx 0
vtrayy 0
.. doesn't matter where the label cords are!!!!!!
I'm sure this is also the problem with your taskbar ;)

Posted by member 189895 on 2004-08-27 16:37:06 link

I knew that some of that was off. Yes I have tray and taskbar loading first. I had always on top for when I was not using xlabel. Do I need to put xtaskbarloadinbox in the xtaskbar rc file?
Do I need to put the hook line in step rc at all?

I am still having problems. Here is the new config.

In xlabel:
*Label VtrayLabel
VtrayLabelLeftBorder 4
VtrayLabelRightBorder 4
VtrayLabelMoveable
VtrayLabelMoveModifierKey "ctrl"
vtraybitmap "systemtray.png"
vtrayLabelX 0
vtraylabely 0
VTrayLabelAddToGroup "100"
VTrayLabelWidth "95"
VTrayLabelHeight "25"
VTrayLabelImage "VTrayBox.png"
*vtrayLabelModuleHook !vTrayHook

In systray.rc:

vtraySettingsCompatibility
systrayX 0
systrayY 0
systrayHeight 26
systrayIconSize 16
systrayIconSpacingX 6
systrayIconSpacingY 0
systrayDirection left
systrayBitmap systemtray.png
systrayBorderLeft 0
systrayBorderRight 0
systrayRememberIcons true
systraySnap true
systrayBordersize 5
;systrayBorderColor ffffff
systrayBorderDrag true
systrayAutoSize
systrayOnAdd !vtrayshowhide 30

Thanks in advance.

Posted by member 32550 on 2004-08-27 17:14:23 link

if you want to hook xtaskbar into a label or lsbox, you need this setting!!!!
try set the width of the tray to 0

I'm not quite sure why you're using traySnap... it's hooked, so it doesnÄt make any sense.

ah *lol* .... what is wrong in those lines???

*Label VtrayLabel
VtrayLabelMoveModifierKey "ctrl"
vtraybitmap "systemtray.png"
vtrayLabelX 0
vtraylabely 0

(watch the bold ones, maybe you'll find it now on your own)


the trayonadd.. you have to write more then that.
onAdd [!resize label]
onDel [!resize label again]

in the past I had problems with vTraySettingsCompatibility, maybe you should kill this setting and rename systray to vTray, could be also a problem

Posted by member 32550 on 2004-08-27 17:16:53 link

oh.. btw: maybe you should have a look at

vtraybitmap "systemtray.png"
cause this issn't an existing setting in xLabel :)
it's
vtraylabelimage "systemtray.png"

*g*

Posted by member 35 on 2004-08-27 17:33:57 link

if you use vtraySettingsCompatibility you have to use !SystrayHook

Posted by member 189895 on 2004-08-27 20:02:20 link

I took off vtraysettingscompatibility and changed the settings the reflect the following:
added line to step.rc - *vtrayLabelModuleHook !vtrayHook
systray.rc:
vTrayX 0
vTrayY 0
vTrayWidth 0
vTrayHeight 26
vTrayIconSize 16
vTrayIconSpacingX 6
vTrayIconSpacingY 0
vTrayDirection left
vTrayBitmap systemtray.png
vTrayBorderLeft 0
vTrayBorderRight 0
vTrayRememberIcons true
vTraySnap true
vTrayBordersize 5
vTrayBorderColor ffffff
vTrayBorderDrag true
vTrayAutoSize
vTrayOnAdd [!vtrayshowhide 30]

xlabel.rc:
*Label VtrayLabel
VtrayLabelLeftBorder 4
VtrayLabelRightBorder 4
VtrayLabelMoveable
VtrayLabelMoveModifierKey "ctrl"
vtraylabelimage "systemtray.png"
vtrayLabelX 0
vtraylabely 0
VTrayLabelAddToGroup "100"
VTrayLabelWidth "200"
VTrayLabelHeight "25"
*vtrayLabelModuleHook !vtrayHook

Sorry for all the trouble. I really don't know why this isn't working. It produces a bar in the upperleft of the screen, that's it. No icons are in it. Could you show me a sample config that works?

Thanks guys.

- Dave.

Posted by member 32550 on 2004-08-27 20:43:18 link

sure it cannot work.
think logical:
your tray's direction is left
but you start in the label at x=0 y=0 ... so if it grows... it grows out of the image ;)

first of all, create label, your basic on the right side of the screen (labelx &resolutionx-"your label start width"$)
then positinate the tray's x coordiante (vtrayx $vtraylabelcurrentwidth-"iconsize+border"$)

the on add had to look like:

vTrayOnAdd !labelresize vtraylabel -"iconsize+border" 0
vTrayOnDel !labelresize vtraylabel "iconsize+boder" 0

*in your case iconsize+boder = 16+6 = 22 (6 px x-spacing?? issn't it too much?)

Posted by member 32550 on 2004-08-27 20:44:05 link

... damn typos :-s

Posted by member 189895 on 2004-08-27 23:08:32 link

Thanks, I think I have it for the most part, however I have a background image for both xlabel and vtray. I want to just have it on xlabel however when I remove the line from vtray it gives it a black background.

Thanks again.