SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines how the control is resized based on its contents.
Get
| VB.NET | Style = object.AutoSize As SftButtonAutoSizeConstants Style = object.CtlAutoSize As SftButtonAutoSizeConstants |
| VB | Style = object.AutoSize As SftButtonAutoSizeConstants |
| C#.NET | SftButtonAutoSizeConstants Style = object.AutoSize; SftButtonAutoSizeConstants Style = object.CtlAutoSize; |
| VC++ | enum SftButtonAutoSizeConstants Style = object->AutoSize; enum SftButtonAutoSizeConstants Style = object->GetAutoSize(); |
| C | HRESULT object->get_AutoSize(enum SftButtonAutoSizeConstants* Style); |
Put
| VB.NET | object.AutoSize = Style As SftButtonAutoSizeConstants object.CtlAutoSize = Style As SftButtonAutoSizeConstants |
| VB | object.AutoSize = Style As SftButtonAutoSizeConstants |
| C#.NET | SftButtonAutoSizeConstants object.AutoSize = Style; SftButtonAutoSizeConstants object.CtlAutoSize = Style; |
| VC++ | enum SftButtonAutoSizeConstants object->AutoSize = Style; void object->PutAutoSize(enum SftButtonAutoSizeConstants Style); |
| C | HRESULT object->put_AutoSize(enum SftButtonAutoSizeConstants Style); |
object
Style
Defines how the control is resized based on its contents.
| Name | Value | Description |
|---|---|---|
| autosizeSftButtonNone | 0 | None - The control is not automatically resized. |
| autosizeSftButtonTopLeft | 1 | Top/Left Corner - The control is automatically resized. The top, left corner remains at the same position as the control is resized. |
| autosizeSftButtonTopRight | 2 | Top/Right Corner - The control is automatically resized. The top, right corner remains at the same position as the control is resized. |
| autosizeSftButtonBottomLeft | 3 | Bottom/Left Corner - The control is automatically resized. The bottom, left corner remains at the same position as the control is resized. |
| autosizeSftButtonBottomRight | 4 | Bottom/Right Corner - The control is automatically resized. The bottom, right corner remains at the same position as the control is resized. |
| autosizeSftButtonTopCenter | 5 | Top Center - The control is automatically resized. The top, center location remains at the same position as the control is resized. |
| autosizeSftButtonBottomCenter | 6 | Bottom Center - The control is automatically resized. The bottom, center location remains at the same position as the control is resized. |
| autosizeSftButtonLeftCenter | 7 | Left Side Center - The control is automatically resized. The left, center location remains at the same position as the control is resized. |
| autosizeSftButtonRightCenter | 8 | Right Side Center - The control is automatically resized. The right, center location remains at the same position as the control is resized. |
| autosizeSftButtonCenter | 9 | Center - The control is automatically resized. The center of the control remains at the same position as the control is resized. |
The AutoSize property defines how the control is resized based on its contents.
If AutoSize is set to a value other than autosizeSftButtonNone, the control is automatically resized whenever its contents change, so all graphics and text components fit without being clipped.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' save the button size to demonstrate auto-sizing
savedSize = AxSftButton2.Size
savedLoc = AxSftButton2.Location
' initialize a SftButton control to look like a check box
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
Private Sub Form_Load()
' save the button size to demonstrate auto-sizing
savedWidth = SftButton2.Width
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
{
// save the button size to demonstrate auto-sizing
savedSize = axSftButton2.Size;
savedLoc = axSftButton2.Location;
// initialize a SftButton control to look like a check box
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;
// save the button size to demonstrate auto-sizing
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;
See Also SftButton Object | Object Hierarchy
