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 the control's caption.
Get
VB.NET | Text = object.Text As String |
VB | Text = object.Text As String |
C#.NET | string Text = object.Text; |
VC++ | _bstr_t Text = object->Text; _bstr_t Text = object->GetText(); |
C | HRESULT object->get_Text(BSTR* Text); |
Put
VB.NET | object.Text = Text As String |
VB | object.Text = Text As String |
C#.NET | string object.Text = Text; |
VC++ | _bstr_t object->Text = Text; void object->PutText(_bstr_t Text); |
C | HRESULT object->put_Text(BSTR Text); |
object
Text
Defines the control's caption.
The Text property defines the control's caption.
The caption can include an accelerator key. By using the & character in the Text property, the following character becomes an accelerator key. If the user types Alt plus the defined accelerator key, the control receives the input focus and the Click event occurs.
For example, if the Text property is set to "&Help", the displayed caption will read "Help", i.e., the H is underlined. If the user types Alt+h, the Click event occurs. To display an & character use "&&".
If the AllowFocus property is set to False, the control does not support accelerator keys.
The text component of the button label can contain more than one line of text. By using carriage-return and line-feed characters, multiple lines can be defined.
The layout of the button label and the position and alignment of the text component are defined using the Orientation, TextAlignHorz and Image1AlignVert properties.
For detailed information on the use of the Orientation, Image1, Image1AlignHorz, Image1AlignVert, Image2, Image2AlignHorz, Image2AlignVert, Text, TextAlignHorz, TextAlignVert properties, please see "Button Label".
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click Application.Exit() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxSftButton8.Text = "Two Lines" & vbCrLf & "of Text" End Sub
Option Explicit Private Sub Command1_Click() End End Sub Private Sub Form_Load() SftButton8.Text = "Two Lines" & vbCrLf & "of Text" End Sub
private void button1_Click(object sender, System.EventArgs e) { Application.Exit(); } private void Form1_Load(object sender, System.EventArgs e) { axSftButton8.Text = "Two Lines\nof Text"; }
m_BoldFont.CreateFontIndirect(&lf); m_Title.SetFont(&m_BoldFont); // Get all ISftButton interface pointers for access to all // properties and methods (see Using SftButton/OCX with Visual C++ // in the online help for more information) m_vButton8 = m_Button8.GetControlUnknown(); m_vButton8->Text = _bstr_t(_T("Two Lines\nof Text")); 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