HeaderPane
Main
Hide
Share Link
Print

DropDownAlignment Property, SftDate Object

Defines how the dropdown is aligned with the field.

Syntax

Get

C#SftDateAlignConstants Alignment = object.DropDownAlignment;
VB.NETAlignment = object.DropDownAlignment As SftDateAlignConstants
C++enum SftDateAlignConstants Alignment = object->DropDownAlignment;
enum SftDateAlignConstants Alignment = object->GetDropDownAlignment();
CHRESULT object->get_DropDownAlignment(enum SftDateAlignConstants* Alignment);

Put

C#SftDateAlignConstants object.DropDownAlignment = Alignment;
VB.NETobject.DropDownAlignment = Alignment As SftDateAlignConstants
C++enum SftDateAlignConstants object->DropDownAlignment = Alignment;
void object->PutDropDownAlignment(enum SftDateAlignConstants Alignment);
CHRESULT object->put_DropDownAlignment(enum SftDateAlignConstants Alignment);

object

A SftDate object.

Alignment

Defines how the dropdown is aligned with the field.

NameValueDescription
alignSftDateNear0Aligned with the field's leading edge
alignSftDateFar1Aligned with the field's trailing edge

Comments

The DropDownAlignment property defines how the dropdown is placed below the field. The default is alignSftDateNear. A dropdown that doesn't fit on the monitor below the field opens above it and is moved horizontally to stay on the monitor. p The leading edge is the left edge, or the right edge if the control is laid out from right to left (RightToLeft).

Examples

C# View entire sample code

            comboDarkMode.SelectedIndex = (int)sftCalendar.DarkMode;
            comboHighContrast.Items.AddRange(new object[] { "Off", "On", "Auto" });
            comboHighContrast.SelectedIndex = (int)sftCalendar.HighContrastMode;
            comboButtons.Items.AddRange(new object[] { "Dropdown", "Up/down", "Dropdown, up/down", "None" });
            comboButtons.SelectedIndex = (int)fieldDate.Buttons;
            comboBorder.Items.AddRange(new object[] { "Single", "3D", "None" });
            comboBorder.SelectedIndex = Math.Max(0, Array.IndexOf(borderStyles, fieldDate.BorderStyle));
            comboAlignment.Items.AddRange(new object[] { "Near", "Far" });
            comboAlignment.SelectedIndex = (int)fieldDate.DropDownAlignment;
            comboAcross.Items.AddRange(new object[] { "1", "2", "3" });
            comboAcross.SelectedIndex = cal.MonthsAcross - 1;
            comboDown.Items.AddRange(new object[] { "1", "2" });
            comboDown.SelectedIndex = cal.MonthsDown - 1;
            comboWeekNumbers.Items.AddRange(new object[] { "None", "Culture rule", "ISO 8601" });
            comboWeekNumbers.SelectedIndex = !cal.ShowWeekNumbers ? 0 : cal.WeekNumberRule == SftDateWeekRuleConstants.weekRuleSftDateISO8601 ? 2 : 1;
            comboFirstDay.Items.AddRange(new object[] { "(Culture)", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" });

VB.NET View entire sample code

        comboDarkMode.SelectedIndex = CInt(sftCalendar.DarkMode)
        comboHighContrast.Items.AddRange(New Object() {"Off", "On", "Auto"})
        comboHighContrast.SelectedIndex = CInt(sftCalendar.HighContrastMode)
        comboButtons.Items.AddRange(New Object() {"Dropdown", "Up/down", "Dropdown, up/down", "None"})
        comboButtons.SelectedIndex = CInt(fieldDate.Buttons)
        comboBorder.Items.AddRange(New Object() {"Single", "3D", "None"})
        comboBorder.SelectedIndex = Math.Max(0, Array.IndexOf(borderStyles, fieldDate.BorderStyle))
        comboAlignment.Items.AddRange(New Object() {"Near", "Far"})
        comboAlignment.SelectedIndex = CInt(fieldDate.DropDownAlignment)
        comboAcross.Items.AddRange(New Object() {"1", "2", "3"})
        comboAcross.SelectedIndex = cal.MonthsAcross - 1
        comboDown.Items.AddRange(New Object() {"1", "2"})
        comboDown.SelectedIndex = cal.MonthsDown - 1
        comboWeekNumbers.Items.AddRange(New Object() {"None", "Culture rule", "ISO 8601"})
        comboWeekNumbers.SelectedIndex = If(Not cal.ShowWeekNumbers, 0, If(cal.WeekNumberRule = SftDateWeekRuleConstants.weekRuleSftDateISO8601, 2, 1))
        comboFirstDay.Items.AddRange(New Object() {"(Culture)", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"})

C++ View entire sample code

            m_Fields[i]->Buttons = (SftDateButtonsConstants) sel;
        break;
    case IDC_BORDER:
        for (int i = 0; i < FIELDS; ++i)
            m_Fields[i]->BorderStyle = (SftDateBorderConstants) g_borderStyles[sel];
        break;
    case IDC_ALIGNMENT:
        for (int i = 0; i < FIELDS; ++i)
            m_Fields[i]->DropDownAlignment = (SftDateAlignConstants) sel;
        break;
    case IDC_ACROSS:
        m_Calendar->Calendar->MonthsAcross = sel + 1;
        break;
    case IDC_DOWN:
        m_Calendar->Calendar->MonthsDown = sel + 1;
        break;

See Also SftDate Object | Object Hierarchy | The Dropdown


Last Updated 11/29/2026 - (email)
© 2026 Softel vdm, Inc.