Choosing colors
The Window painter has two Color dropdown toolbars, which
display colors that you can use for the background and foreground
of components of the window.
Initially, the dropdown toolbars display these color selections:
- 20 predefined colors
- Window color (labeled W)
- Window Text color (labeled T)
- Application Workspace color (labeled A)
- Button color (labeled B)
- Four custom colors (labeled C)
Some of these selections derive from each user’s
system settings. For example, on Windows systems, the Window, Window
Text, Application Workspace, and Button colors are those defined
by the user in the Windows Control Panel. So if you use these colors
in your window, the window colors will change to match the user’s
settings during execution.
Selecting colors
There are two ways to assign colors to controls.
Colors cannot be assigned to some controls You cannot change the colors for CommandButtons, PictureButtons, PictureHyperLinks,
Pictures, Scrollbars, TrackBars, ProgressBars, and OLE controls.
To assign a color using the PainterBar:
- Select the control.
-
Select either the foreground or background color
button from the PainterBar. - Select a color from the cascading menu.
Defining your own colors
You can define your own custom colors for use in windows,
user objects, and DataWindow objects.
To maintain your custom colors:
-
Select Design>Custom Colors from
the menu bar.The Color dialog box displays.
-
Choose an existing color or create the color you
want. You can start with one of the basic colors and customize it
in the palette to the right by dragging the color indicator with
the mouse. You can also specify precise values to define the color. -
When you have the color you want, click Add to
Custom Colors.The new color displays in the list of custom colors.
- Select the new color in the list of custom colors.
-
Click OK.
The new color displays in the Color dropdown toolbar and is
available in all windows, user objects, and DataWindow objects you
create.
PowerBuilder saves custom colors in the [Colors] section
of the PowerBuilder initialization file, so they are available across
sessions.