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 whether the button is a toggle button.
Get
VB.NET | Boolean = object.Toggle As Boolean |
VB | Boolean = object.Toggle As Boolean |
C#.NET | bool Boolean = object.Toggle; |
VC++ | VARIANT_BOOL Boolean = object->Toggle; VARIANT_BOOL Boolean = object->GetToggle(); |
C | HRESULT object->get_Toggle(VARIANT_BOOL* Boolean); |
Put
VB.NET | object.Toggle = Boolean As Boolean |
VB | object.Toggle = Boolean As Boolean |
C#.NET | bool object.Toggle = Boolean; |
VC++ | VARIANT_BOOL object->Toggle = Boolean; void object->PutToggle(VARIANT_BOOL Boolean); |
C | HRESULT object->put_Toggle(VARIANT_BOOL Boolean); |
object
Boolean
Defines whether the button is a toggle button.
Boolean | Description |
---|---|
True | The button is a toggle button. |
False | The button is not a toggle button and automatically returns to its released state after being pressed. |
The Toggle property defines whether the button is a toggle button.
Once the mouse button is released after clicking a button, a button usually returns to its released position (i.e., not pressed). By defining the button as a toggle button using the Toggle property, the button can instead act as an on/off switch. Each mouse click will alternate between the pressed and released positions.
The drop down button portion is controlled by the equivalent DropDownToggle property.
AxSftButton1.DropDownFollows = False AxSftButton1.DropDownPressed = False AxSftButton1.DropDownToggle = False AxSftButton1.Enabled = True AxSftButton1.Follows = False AxSftButton1.OLEDragMode = SftButtonOLEDragModeConstants.OLEDragSftButtonNone AxSftButton1.OLEDropMode = SftButtonOLEDropModeConstants.OLEDropSftButtonNone AxSftButton1.RightToLeft = False AxSftButton1.Toggle = False ' Colors AxSftButton1.BackColor = SystemColors.Control AxSftButton1.BackColorStart = Color.Green AxSftButton1.BackColorEnd = Color.Blue AxSftButton1.BackColorFocus = SystemColors.Control AxSftButton1.BackColorFocusStart = Color.Red AxSftButton1.BackColorFocusEnd = Color.Green
SftButton1.DropDownFollows = False SftButton1.DropDownPressed = False SftButton1.DropDownToggle = False SftButton1.Enabled = True SftButton1.Follows = False SftButton1.OLEDragMode = OLEDragSftButtonNone SftButton1.OLEDropMode = OLEDropSftButtonNone SftButton1.RightToLeft = False SftButton1.Toggle = False ' Colors SftButton1.BackColor = vbButtonFace SftButton1.BackColorStart = vbGreen SftButton1.BackColorEnd = vbBlue SftButton1.BackColorFocus = vbButtonFace SftButton1.BackColorFocusStart = vbRed SftButton1.BackColorFocusEnd = vbGreen
axSftButton1.DropDownFollows = false; axSftButton1.DropDownPressed = false; axSftButton1.DropDownToggle = false; axSftButton1.Enabled = true; axSftButton1.Follows = false; axSftButton1.OLEDragMode = SftButtonOLEDragModeConstants.OLEDragSftButtonNone; axSftButton1.OLEDropMode = SftButtonOLEDropModeConstants.OLEDropSftButtonNone; axSftButton1.RightToLeft = false; axSftButton1.Toggle = false; // Colors axSftButton1.BackColor = SystemColors.Control; axSftButton1.BackColorStart = Color.Green; axSftButton1.BackColorEnd = Color.Blue; axSftButton1.BackColorFocus = SystemColors.Control; axSftButton1.BackColorFocusStart = Color.Red; axSftButton1.BackColorFocusEnd = Color.Green;
m_vButton->put_DropDownFollows(VARIANT_FALSE); m_vButton->put_DropDownPressed(VARIANT_FALSE); m_vButton->put_DropDownToggle(VARIANT_FALSE); m_vButton->put_Enabled(VARIANT_TRUE); m_vButton->put_Follows(VARIANT_FALSE); m_vButton->put_OLEDragMode(OLEDragSftButtonNone); m_vButton->put_OLEDropMode(OLEDropSftButtonNone); m_vButton->put_RightToLeft(VARIANT_FALSE); m_vButton->put_Toggle(VARIANT_FALSE); // Colors m_vButton->put_BackColor(COLOR_BTNFACE|0x80000000L); m_vButton->put_BackColorStart(RGB(0,255,0)); m_vButton->put_BackColorEnd(RGB(0,0,255)); m_vButton->put_BackColorFocus(COLOR_BTNFACE|0x80000000L); m_vButton->put_BackColorFocusStart(RGB(255,0,0)); m_vButton->put_BackColorFocusEnd(RGB(0,255,0));
See Also SftButton Object | Object Hierarchy