HeaderPane
Main
Hide
Share Link
Print

ClickStyle Property, SftButton Object

Defines how the control responds to mouse clicks.

Syntax

Get

C#SftButtonClickStyleConstants Style = object.ClickStyle;
VB.NETStyle = object.ClickStyle As SftButtonClickStyleConstants
C++enum SftButtonClickStyleConstants Style = object->ClickStyle;
enum SftButtonClickStyleConstants Style = object->GetClickStyle();
CHRESULT object->get_ClickStyle(enum SftButtonClickStyleConstants* Style);
VBStyle = object.ClickStyle As SftButtonClickStyleConstants

Put

C#SftButtonClickStyleConstants object.ClickStyle = Style;
VB.NETobject.ClickStyle = Style As SftButtonClickStyleConstants
C++enum SftButtonClickStyleConstants object->ClickStyle = Style;
void object->PutClickStyle(enum SftButtonClickStyleConstants Style);
CHRESULT object->put_ClickStyle(enum SftButtonClickStyleConstants Style);
VBobject.ClickStyle = Style As SftButtonClickStyleConstants

object

A SftButton object.

Style

Defines how the control responds to mouse clicks.

NameValueDescription
clickstyleSftButtonControl0Control - The Click event occurs when the left mouse button is pressed anywhere on the control and then released.
clickstyleSftButtonExact1Exact (Pictures or Text) - The Click event occurs when the left mouse button is pressed on a graphics or text component of the control and then released.
clickstyleSftButtonPictures2Pictures Only - The Click event occurs when the left mouse button is pressed on a graphics component of the control and then released.
clickstyleSftButtonText3Text Only - The Click event occurs when the left mouse button is pressed on a text component of the control and then released.

Comments

The ClickStyle property defines how the control responds to mouse clicks.

Limiting the Click event using the ClickStyle property is most useful when the ButtonStyle property is set to styleSftButtonNone and only text or graphics components are visible.

Examples

C# View entire sample code

    axSftButtonCheck.BorderAlways = false;
#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)

VB.NET View entire sample code

    AxSftButtonCheck.BorderAlways = False
#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

C++ View entire sample code

    m_CtlButton2.GetClientRect(&m_savedRect);
    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
}

VB6 View entire sample code

    savedHeight = SftButton2.Height
    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()

See Also SftButton Object | Object Hierarchy


Last Updated 11/03/2026 - (email)
© 2026 Softel vdm, Inc.