Several control properties enable you to change the color of various aspects of your control, such as the background color, border color, text color, row color (in HTML Tables), and so on. Use the Color well to assign colors to all of these properties.
The following is a list of properties that assign colors. For more information on these properties, see Form and Control Properties Reference.
If a control has any of these attributes set to Default, then it uses the color settings for BackColor and ForeColor for the form itself, unless it is one of the following:
You can assign one of the twenty colors in the Colors box, or you can click Other to open the Colors dialog box, where you can assign one of forty-eight predefined colors or define your own custom color.
Note: You can also assign colors using a Cascading Style Sheet. If your form has a Cascading Style Sheet, setting any color property to Default means that WebFOCUS Maintain will look in the style sheet for the color to use. If you set any color property to anything other than Default, then WebFOCUS Maintain will use that setting. For more information on Cascading Style Sheets, see Using Cascading Style Sheets.
The Color drop-down list box opens.
Click Other to select one of the basic colors.
Type the desired values in the boxes below the Color Box. The boxes on the left use hue, saturation, and luminosity. The boxes on the right use the three primary colors used by color monitors: red, green, and blue.
The color is added to the Custom Colors chart on the left.
For more information on using the Colors dialog box, click the question mark next to the close box and then click on any element in the dialog box.
To set the value of a form or control color property, use the following syntax
[Winform Show_Inactive form;]form.[control.]SETcolorproperty(amount_of_red, amount_of_green, amount_of_blue);
Is required if the form is not currently the active form.
Is the name of the form, determined by the (Name) property.
Is the name of the control, determined by the (Name) property.
Is the name of the color property (BackColor, ForeColor, and so on).
Defines the color by the amount of red, green, and blue (RGB) present in the color. For more information on how these colors work, open the Colors dialog box, click the question mark next to the close box, and then click Red, Green, or Blue.
Note: You can generate this syntax by selecting the property in the property sheet and dragging it to the Procedure Editor or the Event Handler editor.