FormColor method

[method icon] FormColor(Name$, Color$)

>FormColor

FormColor

The FormColor(component, color) method sets color properties for components of a form displayed in KCML style. KCML style is enabled on the first call to this method. The color name can be one of the standard HTML colors or can specify an RGB value using a hex string in the format "0xBBGGRR" where B, G and R represent the blue, green and red components respectively.

The following tables list the form components for which a color may be specified.

These components set the user preference colors. Setting these colors will not enable KCML style.

Component Description
Edit The background color of edit controls
EditReadOnly The background color of read only edit controls
ConvertedEdit The background color of alternative currency edit controls
ConvertedEditReadOnly The background color of read only alternative currency edit controls
Tag The color of descriptive tag text in edit controls

These components set colors used on the form.

Component Description
FormBack The background color of the form
DlgEnabledText Text color of enabled labels
DlgDisabledText Text color of disabled labels
FocusBack Background color of the control that has focus
FocusBorder Border color of the control that has focus

These components are used by tab controls.

Component Description
TabBack The background color of a tab page
TabEarText The text color of a tab ear
TabEarBack The background color of a tab ear
TabSelEarText The text color of the ear of the currently active tab page
TabSelEarBack The background color of the ear of the currently active tab page
TabEarDisabledText The text color of a disabled tab ear

These components are used by buttons.

Component Description
ButtonFace The background color of a button
ButtonText The text color of a button
ButtonDisabledText The text color of a disabled button
DefaultButtonFace The background color of the current default button
DefaultButtonText The text color of the current default button
DefaultButtonBorder The border color of the current default button

These components are used by grid controls.

Component Description
GridHeadBack The background color of grid heading cells
GridHeadText The text colour of grid heading cells
GridHeadLine The color of the lines separating grid heading cells
GridNormalBack The background color of grid cells
GridNormalText The text color of grid cells
GridNormalLine The color of the lines separating grid cells
GridDisabledCursor The background color of cursor-disabled grid cells

These components are used by groupboxes.

Component Description
GroupBodyText Text colour of labels inside a groupbox
GroupBodyDisabledText Text colour of disabled labels inside a groupbox
GroupBack The background color of the pane of a groupbox
GroupBack2 Alternative background color for a nested groupbox.
Nested groupboxes alternate their background color between GroupBack and GroupBack2.
GroupTopText The text color of a groupbox heading
GroupTopDisabledText The text color of a disabled groupbox heading
GroupTopBack The backgrond color of a groupbox heading

These components are used by edit controls.

Component Description
ReadOnlyBack Background color of read-only edits and grid cells
EditableBack Background color of editable edits and grid cells
EditableText Text color of edits and also comboboxes, trees and listboxes
ReadOnlyText Text color of read only edits.
AlternativeCurrencyText Text color of edits displaying values using the alternative currency.
AlternativeCurrencyBack Background color of edits displaying values using the alternative currency.
ReadOnlyAlternativeCurrencyText Text color of readonly edits displaying values using the alternative currency.
ReadOnlyAlternativeCurrencyBack Background color of read only edits displaying values using the alternative currency.
// REM Set up a button color scheme
Forms.FormColor("ButtonFace", "LightSteelBlue")
Forms.FormColor("ButtonText", "Black")
Forms.FormColor("ButtonDisabledText", "Gray")
Forms.FormColor("DefaultButtonFace", "LightSeaGreen")
Forms.FormColor("DefaultButtonBorder", "Black")
See also:

AddTool, AddToolAlert, AddToolFile, AddToolMenu, BlankDesktop, EnableAltCurrencyMode, FormColorBorderThreshold, FormColorEnableGridBorder, HonorFormVisibleProperty, PersistFormSize, SetAltCurrencyMode, SetDBeditSearchTimeout, SetFormColors, SetGridCopyTimeout, SetToolAlertItemText, SetToolBarSize, SetToolItemText, SetToolMenuText, ShowToolbarOnly, SmallScreenLargeToolBar, SpoofGraph, TabEnterKey, TabReturnKey, UserColor