XLabel Event handling Thread last updated on 2004-06-10 08:40:40

Posted by member 45783 on 2004-06-09 14:23:29

How in the name of some greater entity does the event handling work?

For example the usage of
"[label-name]OnEnter !Bang"
is a complete mystery to me.

I've read the docs VERY throughly, checked all possibilities and tried it with each and every of the labels I have in my darn theme. Nothing. I tried this on Xlabel 2.95, 3.0 and now 3.05, but without success.

Does this feature work at all? Anyone?

Posted by member 45783 on 2004-06-09 14:34:46 link

I'd like to say a bad word now, as when I seemingly changed absolutely nothing, it begun to work.

I hate it when computers do this...

Posted by member 12798 on 2004-06-09 14:38:25 link

somelabelOnEnter !somebang
somelabelOnLeave !somebang

works, just changed the names. either you're doing something wrong, or you simply misunderstood or missed something. post what you want to do, then we'll solve the problem for sure :)

Posted by member 32550 on 2004-06-09 15:53:18 link

[label-name]OnEnter !Bang
------
label-name = Your_Label_Name
(WinampLabelX
WinampLabelY
WinampLabelOnEnter.....)
OnEnter = If you move your mouse over the label, then do this:
!Bang = Command, it's like an executeable for litestep, !Taskbarshow, !TaskbarHide, !YourScriptBang,....

Posted by member 45783 on 2004-06-10 01:57:03 link

What I actually was trying to do was to hide a label when the cursor leaves it. The point was to use this to hide the theme UI when not needed (more screen space == good).

ie. AllLabelOnLeave "!BarHideHandler" (custom MZScript bang)

I used XLabel in the place of LSBox so that I would gain access to those event routines and be able to pull this off.

It seems that in addition to XLabel pissing in my eye, anything else in the label blocks the actual label from responding, and if the cursor is on a taskbar, which is in a label, the OnEnter/OnLeave -clause never happens. I thought and thought, but couldn't come up with any workarounds.
Has anyone done somehing similiar to this?

Posted by member 12798 on 2004-06-10 05:37:29 link

if i understand you correctly, you have modules hooked to the label, so they're covering it, right? if so, you'll have to use hotspots, there's no workaround.

Posted by member 32550 on 2004-06-10 08:20:53 link

the taskbar is no label. if you've hooked the taskbar on a label. you can do very easy, just create a non visable label above the taskbar (maybe hooked) and give it the events.
the problem is, that a taskbar above the label surely doesn't react on mouse events, cause there issn't a label.
also, if you want to hide the label with all hooked modules, just hide the label, you don't really need a custom script for that, all modules on the label will be hidden/moving too

Posted by member 45783 on 2004-06-10 08:40:40 link

I followed ElkMonsters instructions and tried ckHotspots, which worked great. The regions ckHotspots creates are completely transparent and let through mouse clicks, so it didn't have any effect on my themes' other functionality and by fiddling with the custom bang, I got it to actually do it's stuff only when needed.

Thank you all for your advice.