:: Forum >>

Can the selector color be set?

In version 1.0, it was possible to set alignment and color with a CSS style.

I'm now trying to test this in version 2.0 but it appears I can't set the color.

Is this possible?
Anthony
Wednesday, February 6, 2008
OK,

I can answer this myself. This works -

obj.setSelectorVisible(true)
obj.setSelectorWidth(30)
obj.setSelectorText(function(r){return fix(this.getRowPosition(r)+1)})
obj.defineSelectorProperty("color")
obj.setSelectorColor(function(){return "red"})
obj.getSelectorTemplate().setStyle("color", function(){
return this.getSelectorProperty("color")})

I can't quite get the selector numbers to be right-aligned yet but I'll post the solution if I find it.
Anthony
Thursday, February 7, 2008
This code makes sense if you want to assign dynamic/calculated color, so you need a function. Otherwise you can just use -

obj.getSelectorTemplate().setStyle("color", "red");
Alex (ActiveWidgets)
Thursday, February 7, 2008
Hi Alex,

Yes, I've also fixed the selector's text alignment so my code is now simply -

...
obj.setSelectorText(function(r){return this.getRowPosition(r)+1})
obj.getSelectorTemplate().setStyle("color", "red")
obj.getSelectorTemplate().setStyle("text-align", "right")

Thanks.
Anthony
Thursday, February 7, 2008

This topic is archived.


Back to support forum

Forum search