HeaderPane
Main
Hide
Share Link
Print

Text Property, SftBox Class

Defines the text shown in the edit field.

Class: SftBox
Namespace: Softelvdm.SftBoxNET
Assembly: Softelvdm.SftBoxNET

Syntax

public override string Text { get; set; }
Public Overrides Property Text As String

Value

The text of the edit field. In a DropDownList style combo box, the text of the selected item's display column.

The default value is String.Empty.

Comments

Defines the text shown in the edit field.

Setting the text selects the first item whose display text equals it (ignoring case), or no item if there is none. A DropDown or Simple style combo box keeps a text that matches no item; a DropDownList style combo box shows the selected item's text instead.

Examples

C# View entire sample code

            sftBox1.SelectedItem = sftBox1.Items[5];
            sftBox2.SelectedItem = sftBox2.Items[0].Children[1];

            // with the Build phase collapsed, the rows shown, all items and the outline are numbered differently
            sftBox7.Items[1].Collapse(CollapseStyleEnum.All);

            // the installed fonts, each name shown in its own font, with an image for TrueType and OpenType fonts
            sftBox3.FillFontNames(FontListOptionsEnum.ShowInFont | FontListOptionsEnum.ShowTypeImage);
            sftBox3.Text = "Segoe UI";
            if (sftBox3.SelectedItem == null && sftBox3.Items.Count > 0)
                sftBox3.SelectedItem = sftBox3.Items[0];

            BindLookup();

            FillCombo(comboSearch, typeof(SearchModeEnum), sftBox5.SearchMode);
            FillCombo(comboAlignment, typeof(DropDownAlignmentEnum), sftBox1.DropDownAlignment);

VB.NET View entire sample code

        SftBox1.SelectedItem = SftBox1.Items(5)
        SftBox2.SelectedItem = SftBox2.Items(0).Children(1)

        ' with the Build phase collapsed, the rows shown, all items and the outline are numbered differently
        SftBox7.Items(1).Collapse(CollapseStyleEnum.All)

        ' the installed fonts, each name shown in its own font, with an image for TrueType and OpenType fonts
        SftBox3.FillFontNames(FontListOptionsEnum.ShowInFont Or FontListOptionsEnum.ShowTypeImage)
        SftBox3.Text = "Segoe UI"
        If SftBox3.SelectedItem Is Nothing AndAlso SftBox3.Items.Count > 0 Then
            SftBox3.SelectedItem = SftBox3.Items(0)
        End If

        BindLookup()

        FillCombo(ComboSearch, GetType(SearchModeEnum), SftBox5.SearchMode)

See Also SftBox Class | Classes | SftBox/NET 3.0