How in the name of some greater entity does the event handling work?
For example the usage of
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?
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...
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 :)
label-name = Your_Label_Name
OnEnter = If you move your mouse over the label, then do this:
!Bang = Command, it's like an executeable for litestep, !Taskbarshow, !TaskbarHide, !YourScriptBang,....
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?
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.
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
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.