HeaderPane
Main
Hide
Share Link
Print

DropDownPosition Property, SftBox Class

Defines whether the dropdown is shown below or above the control.

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

Syntax

public DropDownPositionEnum DropDownPosition { get; set; }
Public Property DropDownPosition As DropDownPositionEnum

Value

Below or Above; the dropdown uses the other side if there is more room there.

The default value is DropDownPositionEnum.Below.

Comments

Defines whether the dropdown is shown below or above the control.

Examples

C# View entire sample code

            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);
            FillCombo(comboPosition, typeof(DropDownPositionEnum), sftBox1.DropDownPosition);
            FillCombo(comboNumbering, typeof(RowHeaderNumberingEnum), sftBox7.List.RowHeaders.Numbering);
            FillCombo(comboDarkMode, typeof(DarkModeEnum), sftBox1.DarkMode);
            FillCombo(comboHighContrast, typeof(HighContrastModeEnum), sftBox1.HighContrastMode);
            DpiChanged += Form1_DpiChanged;
        }

        // On the .NET Framework, a ComboBox in a container keeps its old font when the window moves to a monitor with

VB.NET View entire sample code

        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)
        FillCombo(ComboAlignment, GetType(DropDownAlignmentEnum), SftBox1.DropDownAlignment)
        FillCombo(ComboPosition, GetType(DropDownPositionEnum), SftBox1.DropDownPosition)
        FillCombo(ComboNumbering, GetType(RowHeaderNumberingEnum), SftBox7.List.RowHeaders.Numbering)
        FillCombo(ComboDarkMode, GetType(DarkModeEnum), SftBox1.DarkMode)
        FillCombo(ComboHighContrast, GetType(HighContrastModeEnum), SftBox1.HighContrastMode)
    End Sub

    ' On the .NET Framework, a ComboBox in a container keeps its old font when the window moves to a monitor with
    ' another scale. Setting another font and then the inherited one again makes it use the new one.

See Also SftBox Class | Classes | SftBox/NET 3.0