Hide

SftButton/OCX 3.0 - Button Control

Display
Print

HoverStyle Property, SftButton Object

Defines how images respond to mouse cursor positions.

Syntax

Get

VB.NETStyle = object.HoverStyle As SftButtonHoverStyleConstants
VBStyle = object.HoverStyle As SftButtonHoverStyleConstants
C#.NETSftButtonHoverStyleConstants Style = object.HoverStyle;
VC++enum SftButtonHoverStyleConstants Style = object->HoverStyle;
enum SftButtonHoverStyleConstants Style = object->GetHoverStyle();
CHRESULT object->get_HoverStyle(enum SftButtonHoverStyleConstants* Style);

Put

VB.NETobject.HoverStyle = Style As SftButtonHoverStyleConstants
VBobject.HoverStyle = Style As SftButtonHoverStyleConstants
C#.NETSftButtonHoverStyleConstants object.HoverStyle = Style;
VC++enum SftButtonHoverStyleConstants object->HoverStyle = Style;
void object->PutHoverStyle(enum SftButtonHoverStyleConstants Style);
CHRESULT object->put_HoverStyle(enum SftButtonHoverStyleConstants Style);

object

A SftButton object.

Style

Defines how images respond to mouse cursor positions.

NameValueDescription
hoverstyleSftButtonControl0Control - The pictures defined using the Image1Hover and Image2Hover properties are used as soon as the mouse cursor is over the control, not necessarily over the picture component itself.
hoverstyleSftButtonExact1Exact - The pictures defined using the Image1Hover and Image2Hover properties are used only when the mouse cursor is over the picture component itself, otherwise the pictures defined using Image1 and Image2 are used.

Comments

The HoverStyle property defines how images respond to mouse cursor positions.

Examples

VB.NET

#If VisualStudio2003AndEarlier Then
    AxSftButtonCheck.AutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter
#Else
    AxSftButtonCheck.CtlAutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter
#End If
    AxSftButtonCheck.Bounce = SftButtonBounceStyleConstants.bounceSftButtonNo
    AxSftButtonCheck.ButtonStyle = SftButtonStyleConstants.styleSftButtonNone
    AxSftButtonCheck.ClickStyle = SftButtonClickStyleConstants.clickstyleSftButtonPictures
    AxSftButtonCheck.HoverStyle = SftButtonHoverStyleConstants.hoverstyleSftButtonExact
    AxSftButtonCheck.Image1.Appearance = SftPictureImageConstants.sftImageCheckboxYes
    AxSftButtonCheck.Text = "A SftButton control that looks like a check box with a caption"
    AxSftButtonCheck.ShowFocus = False
End Sub

Private Sub check1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles check1.CheckedChanged
    ' enable/disable the control so the image changes

VB6

    savedYPos = SftButton2.Top

    ' initialize a SftButton control to look like a check box
    SftButtonCheck.BorderAlways = False
    SftButtonCheck.AutoSize = autosizeSftButtonLeftCenter
    SftButtonCheck.Bounce = bounceSftButtonNo
    SftButtonCheck.ButtonStyle = styleSftButtonNone
    SftButtonCheck.ClickStyle = clickstyleSftButtonPictures
    SftButtonCheck.HoverStyle = hoverstyleSftButtonExact
    SftButtonCheck.Image1.Appearance = sftImageCheckboxYes
    SftButtonCheck.Text = "A SftButton control that looks like a check box with a caption"
    SftButtonCheck.ShowFocus = False
End Sub

Private Sub Check1_Click()
    ' enable/disable the control so the image changes

C#

#if VisualStudio2003AndEarlier
    axSftButtonCheck.AutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter;
#else
    axSftButtonCheck.CtlAutoSize = SftButtonAutoSizeConstants.autosizeSftButtonLeftCenter;
#endif
    axSftButtonCheck.Bounce = SftButtonBounceStyleConstants.bounceSftButtonNo;
    axSftButtonCheck.ButtonStyle = SftButtonStyleConstants.styleSftButtonNone;
    axSftButtonCheck.ClickStyle = SftButtonClickStyleConstants.clickstyleSftButtonPictures;
    axSftButtonCheck.HoverStyle = SftButtonHoverStyleConstants.hoverstyleSftButtonExact;
    axSftButtonCheck.Image1.Appearance = SftPictureImageConstants.sftImageCheckboxYes;
    axSftButtonCheck.Text = "A SftButton control that looks like a check box with a caption";
    axSftButtonCheck.ShowFocus = false;
}

private void check1_CheckedChanged(object sender, System.EventArgs e)
{

C++

    m_CtlButton2.MapWindowPoints(this, &m_savedRect);

    // initialize a SftButton control to look like a check box
    m_vButtonCheck->BorderAlways = VARIANT_FALSE;
    m_vButtonCheck->AutoSize = autosizeSftButtonLeftCenter;
    m_vButtonCheck->Bounce = bounceSftButtonNo;
    m_vButtonCheck->ButtonStyle = styleSftButtonNone;
    m_vButtonCheck->ClickStyle = clickstyleSftButtonPictures;
    m_vButtonCheck->HoverStyle = hoverstyleSftButtonExact;
    m_vButtonCheck->Image1->Appearance = sftImageCheckboxYes;
    m_vButtonCheck->Text = "A SftButton control that looks like a check box with a caption";
    m_vButtonCheck->ShowFocus = VARIANT_FALSE;

    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.