I'm trying to set a theme up so that when you hover over xtaskbar, the name of the hovered task is displayed elsewhere in a label. I've tried doing it with onEnter, but it calls onEnter before updating the hovered task, so I get an error. Is what I'm trying to do possible with xlabel and xtaskbar (most recent builds)?
You can just make your label's text:
LabelNameText "[if(notempty(exportedevar('xTaskbarHoverTask')))][exportedevar('xTaskbarHoverTask')][else]Whatever[endif]"
To avoid getting the error in the label at first startup, just add in an empty xTaskbarHoverTask to your vars.
Bumping for jqubit's benefit.
I revised how its done, and I wanted to light up the thread so you saw it. :P You can just use that line as your label's text...no messy onenter/leaves necessary. Due to what I consider a tiny bug*, you will have to include xTaskbarHoverTask with your vars (no need to set it to anything...you can just leave it empty).
*xTaskbar doesn't seem to create that var properly on startup. I believe it only gets created the first time the mouse enters it. If that is the problem, it should be changed to create atleast an empty var when the module initializes. The work-around is pretty simple, though, so maybe it doesn't need fixing...
Wow, this is exactly the information I was looking for. Thanks for helping him/me!
Is there any way to reduce the delay that comes from hovering over the task? I was hoping it would display the name as you hover over it, like a hover graphic, but there's a delay where you have to keep the mouse over the task in order to see anything. That reduces the functionality of it a lot for me.
You could try messing with the label's or xtasbar's update interval. Not sure if that will help...