changing color on mouseover with label Thread last updated on 2006-09-03 06:31:49

Posted by member 130127 on 2006-09-01 07:20:32

hi!
ive boxed a label and wanted it to change the color on mouseover/mouseleave, but it did not work.

heres the code:

LogX "110"
LogY "131"
LogWidth 50
LogHeight 12
LogFontHeight 12
LogJustify "left"
LogFont "Segoe UI Bold"
LogFontColor 523d23
LogImage entry.bmp
LogText "log off"
LogTopBorder 1
LogBottomBorder 1
LogOnMouseEnter !Execute [!LabelSetFontColor 79bab0]
LogOnMouseLeave !Execute [!LabelSetFontColor 523d23]
LogOnLeftClick !Execute [!Logoff]
LogLSBoxName linkbox

whats wrong here?
any replies would be great! thanx!

Posted by member 248213 on 2006-09-01 08:22:06 link

1. Why are you boxing labels!? xLabel is a better "boxer" than anything!

2. If your using xLabel its:
LogFontColor "523d23"
LogHoverFontColor "79bab0"

Posted by member 5575 on 2006-09-01 10:40:58 link

Try downloading a relatively recent theme and look at the configuration. That'll tell you a lot more about how to do things - usually properly. =) Compare a few themes - some things will be done the same way in all of them, other things mmight be done more neatly or cleverly in one theme. That's the best way to learn the basics IMO.

Posted by member 1949 on 2006-09-01 18:35:01 link

Fractal, andy broke that implementation a while ago...
!labelrefresh is the way I had to do it also...

Posted by member 32550 on 2006-09-02 02:55:07 link

@Immortal:
I don't have broke or removed that :P It still works as fractal.design says.

Posted by member 1949 on 2006-09-02 09:31:21 link

I did it this way in Obsidian and upgraded to 3.5.9 and it did not work.
I then had to do it by labelrefresh...

Posted by member 248213 on 2006-09-03 01:03:08 link

Thats how its always been done in every recent release I have used (every release in maybe 2 years?), never had any trouble I can remeber.

Posted by member 212670 on 2006-09-03 02:10:55 link

If you really meant "that's how it's been done since xlabel 3.5, released at the end of February" then you're correct.

(With previous versions you had to do 'LabelOnEnter !LabelSetFontColor Label xxxxxx' or '!LabelRefresh Label LabelFontColor xxxxxx')

Posted by member 248213 on 2006-09-03 06:31:49 link

Man I am losing my mind! xcal you are right!

I just have no memory of using OnEnter like that...

looking at older themes I have written I did use it like that though.
too much weed in my youth...