Hide

SftButton/OCX 3.0 - Button Control

Display
Print

ForeColorPressed Property, SftButton Object

Defines the control's text color when pressed.

Syntax

Get

VB.NETClr = object.ForeColorPressed As System.Drawing.Color
VBClr = object.ForeColorPressed As OLE_COLOR
C#.NETSystem.Drawing.Color Clr = object.ForeColorPressed;
VC++OLE_COLOR Clr = object->ForeColorPressed;
OLE_COLOR Clr = object->GetForeColorPressed();
CHRESULT object->get_ForeColorPressed(OLE_COLOR* Clr);

Put

VB.NETobject.ForeColorPressed = Clr As System.Drawing.Color
VBobject.ForeColorPressed = Clr As OLE_COLOR
C#.NETSystem.Drawing.Color object.ForeColorPressed = Clr;
VC++OLE_COLOR object->ForeColorPressed = Clr;
void object->PutForeColorPressed(OLE_COLOR Clr);
CHRESULT object->put_ForeColorPressed(OLE_COLOR Clr);

object

A SftButton object.

Clr

Defines the control's text color when pressed. For information about color properties, please visit the applicable section "Using SftButton/OCX with ...".

Comments

The ForeColorPressed property defines the control's text color when pressed.

If Windows themes are used, the ForeColorPressed property has no effect, unless UseThemes is set to 2 - Yes (Exclude Text).

The defined color is used to display the text defined using the Text property. If the button is released, the color ForeColor is used instead. If the control is disabled (see Enabled property), the foreground color defined using the ForeColorGrayed property is used instead.

Examples

VB.NET

    AxSftButton1.BackColorHover = SystemColors.Control
    AxSftButton1.BackColorHoverStart = Color.Yellow
    AxSftButton1.BackColorHoverEnd = Color.Cyan
    AxSftButton1.BackColorPressed = SystemColors.Control
    AxSftButton1.DarkEdgeColor = SystemColors.ControlDark
    AxSftButton1.ForeColor = Color.Black
    AxSftButton1.ForeColorGrayed = Color.Gray
    AxSftButton1.ForeColorDownArrow = Color.Blue
    AxSftButton1.ForeColorPressed = Color.Black
    AxSftButton1.LightEdgeColor = SystemColors.ControlLight
    AxSftButton1.ShadowEdgeColor = SystemColors.ControlDarkDark
    AxSftButton1.WhiteEdgeColor = SystemColors.ControlLightLight

End Sub

VB6

    SftButton1.BackColorHover = vbButtonFace
    SftButton1.BackColorHoverStart = vbYellow
    SftButton1.BackColorHoverEnd = vbCyan
    SftButton1.BackColorPressed = vbButtonFace
    SftButton1.DarkEdgeColor = vbButtonShadow
    SftButton1.ForeColor = vbBlack
    SftButton1.ForeColorGrayed = vbGray
    SftButton1.ForeColorDownArrow = vbBlue
    SftButton1.ForeColorPressed = vbBlack
    SftButton1.LightEdgeColor = vb3DLight
    SftButton1.ShadowEdgeColor = vb3DShadow
    SftButton1.WhiteEdgeColor = vb3DShadow
End Sub

C#

    axSftButton1.BackColorHover = SystemColors.Control;
    axSftButton1.BackColorHoverStart = Color.Yellow;
    axSftButton1.BackColorHoverEnd = Color.Cyan;
    axSftButton1.BackColorPressed = SystemColors.Control;
    axSftButton1.DarkEdgeColor = SystemColors.ControlDark;
    axSftButton1.ForeColor = Color.Black;
    axSftButton1.ForeColorGrayed = Color.Gray;
    axSftButton1.ForeColorDownArrow = Color.Blue;
    axSftButton1.ForeColorPressed = Color.Black;
    axSftButton1.LightEdgeColor = SystemColors.ControlLight;
    axSftButton1.ShadowEdgeColor = SystemColors.ControlDarkDark;
    axSftButton1.WhiteEdgeColor = SystemColors.ControlLightLight;
}

C++

    m_vButton->put_BackColorHover(COLOR_BTNFACE|0x80000000L);
    m_vButton->put_BackColorHoverStart(RGB(0,255,255));
    m_vButton->put_BackColorHoverEnd(RGB(255,255,0));
    m_vButton->put_BackColorPressed(COLOR_BTNFACE|0x80000000L);
    m_vButton->put_DarkEdgeColor(COLOR_BTNSHADOW|0x80000000L);
    m_vButton->put_ForeColor(RGB(0,0,0));
    m_vButton->put_ForeColorGrayed(RGB(128,128,128));
    m_vButton->put_ForeColorDownArrow(RGB(0,255,0));
    m_vButton->put_ForeColorPressed(RGB(0,0,0));
    m_vButton->put_LightEdgeColor(COLOR_3DHILIGHT|0x80000000L);
    m_vButton->put_ShadowEdgeColor(COLOR_3DDKSHADOW|0x80000000);
    m_vButton->put_WhiteEdgeColor(COLOR_3DHIGHLIGHT|0x80000000);


    return TRUE;  // return TRUE  unless you set the focus to a control
}

See Also SftButton Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.