Hide

SftButton/OCX 3.0 - Button Control

Display
Print

ShowFocus Property, SftButton Object

Defines whether the control displays a focus rectangle when it has the input focus.

Syntax

Get

VB.NETBoolean = object.ShowFocus As Boolean
VBBoolean = object.ShowFocus As Boolean
C#.NETbool Boolean = object.ShowFocus;
VC++VARIANT_BOOL Boolean = object->ShowFocus;
VARIANT_BOOL Boolean = object->GetShowFocus();
CHRESULT object->get_ShowFocus(VARIANT_BOOL* Boolean);

Put

VB.NETobject.ShowFocus = Boolean As Boolean
VBobject.ShowFocus = Boolean As Boolean
C#.NETbool object.ShowFocus = Boolean;
VC++VARIANT_BOOL object->ShowFocus = Boolean;
void object->PutShowFocus(VARIANT_BOOL Boolean);
CHRESULT object->put_ShowFocus(VARIANT_BOOL Boolean);

object

A SftButton object.

Boolean

Defines whether the control displays a focus rectangle when it has the input focus.

BooleanDescription
TrueThe focus rectangle is displayed when the control has the input focus.
FalseThe focus rectangle is never displayed.

Comments

The ShowFocus property defines whether the control displays a focus rectangle when it has the input focus.

Examples

VB.NET

    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
    AxSftButton1.Enabled = Not check1.Checked
End Sub

VB6

    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
    SftButton1.Enabled = (Check1.Value = 0)
End Sub

C#

    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)
{
    // enable/disable the control so the image changes
    axSftButton1.Enabled = !check1.Checked;
}

C++

    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
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

See Also SftButton Object | Object Hierarchy


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