WinStudio
Creating and Applying a Background Color Definition Variable
To ensure consistency and "same-look-and-feel" across a variety
of forms and components, you can create and apply a set of standard color
definition variables for the forms and components in your application.
These color definition variables are created and maintained using the
Edit
Color dialog box. Once created, these background color definition
variables are available for use in other forms and components.
NOTES:
- To adjust a color definition variable
without affecting the definition itself, apply the variable to
the form or component and then adjust it in the form or component
property sheet (at which point it becomes a custom or modified
definition).
- This procedure assumes that you
already have at least one background color definition variable
created and available in the system.
To create and apply a new color definition variable (and add it to a
list of existing color definition variables):
- Open a form in Design Mode.
- On the Form/Collections property sheet, select the Form tab or the component
to which you want to apply the background color definition.
- In the property sheet Appearance
group, select the Background
Color property.
- In the right margin, to open the Edit
Color dialog box, click the ellipsis (...) button.
- In the Edit Color
dialog box, select one of these options:
- To create a color definition "from scratch",
click New.
- To create a color definition by modifying an existing
definition, select the definition from the list and then click
Copy.
- In the WinStudio
Designer dialog box, specify the name for the new color
definition variable.
NOTE:
When specifying the name, you need not provide the "gbgc_"
prefix to the variable name. WinStudio supplies that prefix automatically.
- Click OK.
- Use the buttons and fields in the Color
group box to specify:
- Style – Color
or Linear Gradient.
- Basic RGB settings for Ext.
Color 0 and (if gradient) Ext.
Color 1.
You can use the color picker dialog box to select the color.
- Alpha (transparency) settings for Ext.
Color 0 and (if gradient) Ext.
Color 1.
You can use either the slider or type a numeric value between 0 and 255
directly in the field.
- Direction the gradient
should paint, if applicable.
- When you have the color definition specified to your satisfaction,
click OK.
NOTE:
Whatever the settings are when you click OK
becomes the color definition for this variable. To change the color definition
later, open the Edit Color dialog
box, adjust the settings, and again click OK.
Changing the color definition variable this way does not change previous
uses of the variable, only future assignments.
WinStudio immediately applies the color definition to the form background
or the designated component. If you do not immediately see the change,
you can click elsewhere on the form to refresh the view.
Notice that the Background Color
property field displays "V(gbgc_variableName),
and the Ext. Color
attribute fields are populated with the values as specified in the color
definition.
Related Topics
About Setting Form and Component
Background Colors
Edit Color Dialog Box
Selecting and Applying a Background
Color Definition Variable
Background
Color Property