Changing a Control’s Background Color Based on its Value
You can customize the background color of a control using a computation action and CSS classes.
Sample Project
To view the sample for this task, import the advanced sample projects as described in Importing the Forms Advanced Samples. The sample form and CSS file for the task described in this section are contained in the forms.samples.controls project.
The form (SetBackgroundColorForControl.form) is at:
forms.samples.controls/Forms/setBGColor/
The CSS file (custom.css) is at:
forms.samples.controls/Presentation Resources/css/
You can double-click the form and CSS filenames (as well as those of other project resources) in the Project Explorer to open them in the editor. There, you can examine their contents and use them as models for your own projects.
Explanation
This topic covers the case where you want to apply a background color to a given control in a form based on the control’s value.
In order to implement this task, you will need to know: