ScrollView - Modifying button label Font color

Hi,

This is my first post here so please be gentle! 

I have inserted a scrollView widget into a scene and I’d like to change the color of the button labels from the default settings. 

I’ve looked at the docs and other forum posts and have tried using the code below but this doesn’t work, the label always remains the default blue:

ocal button1 = widget.newButton { left = 50, top = 5, id = "button1", label = "Swords", font = \_FONT, fontSize = 24, labelColor = { default = {200,79,189}, over = {39,135,184}, }, onEvent = handleButtonEvent } scrollView:insert( button1 )

I’ve also tried adding using ‘fontColor’ in the button table but this doesn’t work either:

local button1 = widget.newButton { left = 50, top = 5, id = "button1", label = "Swords", font = \_FONT, fontSize = 24, fontColor = {200/255,79/255,189/255}, onEvent = handleButtonEvent } scrollView:insert( button1 )

I want to see the font color change from the default blue to be in-line with my coloring scheme. 

I’m using build 2731. 

Any help would be really appreciated.

Thanks

Hi @rob_bourne,

The correct property is definitely “labelColor” (not “fontColor”), with child tables of “default” and “over”. Just remember to specify color values in 0-1 range, not 0-255.

https://docs.coronalabs.com/api/library/widget/newButton.html

Best regards,

Brent

Hi @rob_bourne,

The correct property is definitely “labelColor” (not “fontColor”), with child tables of “default” and “over”. Just remember to specify color values in 0-1 range, not 0-255.

https://docs.coronalabs.com/api/library/widget/newButton.html

Best regards,

Brent