Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Change colour of a button

Avatar

Level 7

How I can change(on Enter event) the colour of a button text to another color and vise versa to default  on exit.

Like links effect

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can use this.caption.font.fill.color.value to change the text colour. I've done this using the mouseEnter/mouseExit events to create a rollover effect.

Enter:

this.caption.font.fill.color.value = "255,255,255"; //white

Exit:

this.caption.font.fill.color.value = "0,0,0"; //black

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

You can use this.caption.font.fill.color.value to change the text colour. I've done this using the mouseEnter/mouseExit events to create a rollover effect.

Enter:

this.caption.font.fill.color.value = "255,255,255"; //white

Exit:

this.caption.font.fill.color.value = "0,0,0"; //black