The button's text color.
Usage
Set_Property(OLECtrlEntID, "OLE.Forecolor", Array)
Values
Array has the following structure:
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<1> | Normal | Color | The text color of the button in its normal state | None |
<2> | Hot | Color | The text color of the button used when the user hovers the mouse over it | None |
<3> | Pushed | Color | The text color of the button used when the user presses it | None |
<4> | Disabled | Color | The text color of the button used when it is disabled | None |
<5> | Focus | Color | The text color of the button used when is has focus | None |
Remarks
The Forecolor property establishes a custom color for you button's caption. Any value passed to one of these fields will override the system colors normally used to render text.
The Normal color is used to render the button's text in its rested state. The Hot color is used when the user hovers over the button with the mouse. The Pushed color establishes the text color for the button while it is being pressed or is in a checked state. The Disabled color sets the text color for the button while it is disabled. Finally, the Focus color sets the text color of the button while it has focus.
Note that for any field set to "None", the text color in that state is determined by the Style property, which uses system colors or Office XP theme colors.
Example
// Make the caption change colors depending on the button state. Forecolor = "" Forecolor<1> = "Red" ; // Normal Forecolor<2> = "Pink" ; // Hot Forecolor<3> = "Maroon" ; // Pressed Forecolor<4> = "Gray" ; // Disabled Forecolor<5> = "Blue" ; // Focused (and at rest) Set_Property(@Window:".OLE_BUTTON", "OLE.Forecolor", Forecolor)