Condividi tramite


ColorSource Property

Determines how a control's colors are set. Available at design time and run time.

Object.ColorSource[ = nSource]

Return Value

  • nSource
    The settings for nSource are:

    Setting

    Description

    0

    Object's Color Properties. The control uses its color property settings (ForeColor, BackColor, and so on). This setting is available for the following controls and objects:

    CheckBox, ComboBox, CommandButton, CommandGroup, Container, Control, EditBox, Form, Image, Label, Line, ListBox, OptionButton, OptionGroup, Page, PageFrame, Shape, Spinner, TextBox, and Toolbar.

    1

    Form's Color Scheme. The control uses the color scheme of the form in which it is placed. This setting is available for the following controls and objects:

    CheckBox, ComboBox, CommandButton, EditBox, Label, ListBox, OptionButton, Shape, Spinner, and TextBox.

    2

    ColorScheme Property Scheme. The control uses the color scheme specified in its ColorScheme property. This setting is available for the following controls and objects:

    CheckBox, ComboBox, CommandButton, EditBox, Label, ListBox, OptionButton, Shape, Spinner, and TextBox.

    3

    Default Scheme. The control uses its default color scheme. For most controls, the default color scheme is the form's color scheme; for EditBoxes and ListBoxes, the default color scheme is Scheme 2, User Menus. This setting is available for the following controls and objects:

    CheckBox, ComboBox, CommandButton, EditBox, Label, ListBox, OptionButton, Shape, Spinner, and TextBox.

    4

    Windows Control Panel (3D Colors) (Default). The control uses the 3D color settings specified in the Windows Control Panel. This setting is available for the following controls and objects:

    CheckBox, ComboBox, CommandButton, CommandGroup, Container, Control, EditBox, Form, Image, Label, Line, ListBox, OptionButton, OptionGroup, Page, PageFrame, Shape, Spinner, TextBox, and Toolbar.

    5

    Windows Control Panel (Windows Colors). The control uses the color settings specified in the Windows Control Panel.This setting is available only for the Form object.

Remarks

Applies To: CheckBox Control | ComboBox Control | CommandButton Control | CommandGroup Control | Container Object | Control Object (Visual FoxPro) | EditBox Control | Form Object | Image Control (Visual FoxPro) | Label Control (Visual FoxPro) | Line Control | ListBox Control | OptionButton Control | OptionGroup Control | Page Object | PageFrame Control | Shape Control | Spinner Control | TextBox Control (Visual FoxPro) | ToolBar Object

Setting a color property (ForeColor, BackColor, SelectedForeColor, and so on) for an object overrides the ColorSource property setting. If a color property is not set for an object, the object's colors are determined by the ColorSource property setting.

See Also

Reference

ColorScheme Property

Other Resources

Properties (Visual FoxPro)

Language Reference (Visual FoxPro)