HeaderPane
Main
Hide
Share Link
Print

DropDownWidthModeEnum Enumeration

Defines the width of the dropdown.

Namespace: Softelvdm.SftBoxNET
Assembly: Softelvdm.SftBoxNET

Syntax

public enum DropDownWidthModeEnum;
Public Enum DropDownWidthModeEnum

Values

NameDescription
ControlThe dropdown is as wide as the control.
FixedThe dropdown has the width defined by the SftBox.DropDownWidth property.
OptimalThe dropdown is wide enough to show all columns completely, and at least as wide as the control.

Comments

Defines the width of the dropdown.

Examples

C# View entire sample code

            countries.Rows.Add(39, "Italy", "Rome");
            countries.Rows.Add(81, "Japan", "Tokyo");
            countries.Rows.Add(52, "Mexico", "Mexico City");
            countries.Rows.Add(34, "Spain", "Madrid");

            sftBox6.Columns.Count = 2;
            sftBox6.Columns[0].DataMember = "Name";
            sftBox6.Columns[1].DataMember = "Capital";
            sftBox6.DropDownWidthMode = DropDownWidthModeEnum.Optimal;
            sftBox6.DisplayMember = "Name";
            sftBox6.ValueMember = "Id";
            sftBox6.DataSource = countries;

            order.CountryId = 81;
            order.PropertyChanged += delegate { ShowOrder(); };
            sftBox6.DataBindings.Add("SelectedValue", order, "CountryId", false, DataSourceUpdateMode.OnPropertyChanged);

VB.NET View entire sample code

        countries.Rows.Add(39, "Italy", "Rome")
        countries.Rows.Add(81, "Japan", "Tokyo")
        countries.Rows.Add(52, "Mexico", "Mexico City")
        countries.Rows.Add(34, "Spain", "Madrid")

        SftBox6.Columns.Count = 2
        SftBox6.Columns(0).DataMember = "Name"
        SftBox6.Columns(1).DataMember = "Capital"
        SftBox6.DropDownWidthMode = DropDownWidthModeEnum.Optimal
        SftBox6.DisplayMember = "Name"
        SftBox6.ValueMember = "Id"
        SftBox6.DataSource = countries

        order.CountryId = 81
        AddHandler order.PropertyChanged, Sub() ShowOrder()
        SftBox6.DataBindings.Add("SelectedValue", order, "CountryId", False, DataSourceUpdateMode.OnPropertyChanged)

See Also Classes | SftBox/NET 3.0