Display hovered task in a label Thread last updated on 2006-03-30 14:09:41

Posted by member 280260 on 2006-03-19 14:12:23

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)?

Posted by member 212670 on 2006-03-19 17:18:30 link

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.

Posted by member 212670 on 2006-03-20 13:37:11 link

Bumping for jqubit's benefit.

Posted by member 280260 on 2006-03-20 20:11:13 link

Pardon?

Posted by member 212670 on 2006-03-20 21:24:49 link

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...

Posted by member 314318 on 2006-03-25 11:27:51 link

Wow, this is exactly the information I was looking for. Thanks for helping him/me!

Posted by member 314318 on 2006-03-30 10:13:04 link

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.

Posted by member 212670 on 2006-03-30 14:09:41 link

You could try messing with the label's or xtasbar's update interval. Not sure if that will help...