Hide

SftButton/OCX 3.0 - Button Control

Display
Print

WhiteEdgeColor Property, SftButton Object

Defines the control's color for white edges.

Syntax

Get

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

Put

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

object

A SftButton object.

Clr

Defines the control's color for white edges. For information about color properties, please visit the applicable section "Using SftButton/OCX with ...".

Comments

The WhiteEdgeColor property defines the control's color for white edges.

This property has no effect if Windows themes are used.

Examples

VB.NET

End Sub

Private Sub BorderTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BorderTimer.Tick
    ' Change the button border
    If AxSftButton3.Pressed Or Color.op_Inequality(AxSftButton3.DarkEdgeColor, SystemColors.ControlDarkDark) Then
        AxSftButton3.DarkEdgeColor = SystemColors.ControlDarkDark
        AxSftButton3.ShadowEdgeColor = SystemColors.ControlDark
        AxSftButton3.LightEdgeColor = SystemColors.ControlLight
        AxSftButton3.WhiteEdgeColor = SystemColors.ControlLightLight
    Else
        AxSftButton3.DarkEdgeColor = SystemColors.ControlLightLight
        AxSftButton3.ShadowEdgeColor = SystemColors.ControlLightLight
        AxSftButton3.LightEdgeColor = SystemColors.ControlLightLight
        AxSftButton3.WhiteEdgeColor = SystemColors.ControlLightLight
    End If
End Sub

VB6

Private Sub BorderTimer_Timer()
    ' Change the button border
    With SftButton3
       If .Pressed Or .DarkEdgeColor <> vb3DDKShadow Then
            .DarkEdgeColor = vb3DDKShadow
            .ShadowEdgeColor = vbButtonShadow
            .LightEdgeColor = vb3DLight
            .WhiteEdgeColor = vb3DHighlight
        Else
            .DarkEdgeColor = vb3DHighlight
            .ShadowEdgeColor = vb3DHighlight
            .LightEdgeColor = vb3DHighlight
            .WhiteEdgeColor = vb3DHighlight
        End If
    End With
End Sub

C#

private void borderTimer_Tick(object sender, System.EventArgs e)
{
    // Change the button border
    if (axSftButton3.Pressed || axSftButton3.DarkEdgeColor != SystemColors.ControlDarkDark)
    {
        axSftButton3.DarkEdgeColor = SystemColors.ControlDarkDark;
        axSftButton3.ShadowEdgeColor = SystemColors.ControlDark;
        axSftButton3.LightEdgeColor = SystemColors.ControlLight;
        axSftButton3.WhiteEdgeColor = SystemColors.ControlLightLight;
    } else {
        axSftButton3.DarkEdgeColor = SystemColors.ControlLightLight;
        axSftButton3.ShadowEdgeColor = SystemColors.ControlLightLight;
        axSftButton3.LightEdgeColor = SystemColors.ControlLightLight;
        axSftButton3.WhiteEdgeColor = SystemColors.ControlLightLight;
    }
}

C++

        m_vButton3->PutDarkEdgeColor(0x80000000L|COLOR_3DDKSHADOW);
        m_vButton3->PutShadowEdgeColor(0x80000000L|COLOR_3DSHADOW);
        m_vButton3->PutLightEdgeColor(0x80000000L|COLOR_3DLIGHT);
        m_vButton3->PutWhiteEdgeColor(0x80000000L|COLOR_3DHILIGHT);
    } else {
        m_vButton3->PutDarkEdgeColor(0x80000000L|COLOR_3DHILIGHT);
        m_vButton3->PutShadowEdgeColor(0x80000000L|COLOR_3DHILIGHT);
        m_vButton3->PutLightEdgeColor(0x80000000L|COLOR_3DHILIGHT);
        m_vButton3->PutWhiteEdgeColor(0x80000000L|COLOR_3DHILIGHT);
    }
}

void CSpecialDlg::ToggleButton()
{
    // Toggle the button and drop down button state
    if (m_vButton4->Pressed) {

See Also SftButton Object | Object Hierarchy


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