-
Can’t change the backgroundColor of a ScriptUI Panel Button Element…
Hey guys,
I am just working on my first After Effects Script. I also want to provide a user friendly UI and I want to customize it to get a unique look.
Now I am trying to change the background Color of my Button. This is what I got so far:
var applyGrp = pixual.palette.add('group', undefined);
applyGrp.alignment = [ScriptUI.Alignment.FILL,ScriptUI.Alignment.FILL];var applyBtn = applyGrp.add('button', undefined, 'Apply', {name: 'apply'});
applyBtn.alignment = [ScriptUI.Alignment.FILL,ScriptUI.Alignment.FILL];applyGrp.addEventListener('mouseover', changeBtnColor, false);
function changeBtnColor(){
var applyGFX = applyGrp.graphics;
var applyGFX_bgColor = applyGFX.newPen(applyGFX.BrushType.SOLID_COLOR, [0,1,0], 1);applyGFX.backgroundColor = applyGFX_bgColor;
}
I don’t get an error when compiling but it doesn’t work. What am I doing wrong?
Sorry, there were no replies found.