Home > Products > BPC PowerForms > Knowledge Base > Scripting > Using the SetCellColor method

Using the SetCellColor method

SetCellColor is used to dynamically change the cell color of a control using scripting. To call the method:




where ControlName is the name of the control whose cell color you want to change and ColorCode is the HTML color's code representation.


For example, let's assume we have a TextBox control called c_Country and a Button control, c_Control4 with an action script used to dynamically change the textbox's cell color to purple.

The Button's custom script:


The actual code:




The Textbox before pressing the Button:


The Textbox after pressing the Button: