Defines how the dropdown is aligned with the field.
Get
| C# | SftDateAlignConstants Alignment = object.DropDownAlignment; |
| VB.NET | Alignment = object.DropDownAlignment As SftDateAlignConstants |
| C++ | enum SftDateAlignConstants Alignment = object->DropDownAlignment; enum SftDateAlignConstants Alignment = object->GetDropDownAlignment(); |
| C | HRESULT object->get_DropDownAlignment(enum SftDateAlignConstants* Alignment); |
Put
| C# | SftDateAlignConstants object.DropDownAlignment = Alignment; |
| VB.NET | object.DropDownAlignment = Alignment As SftDateAlignConstants |
| C++ | enum SftDateAlignConstants object->DropDownAlignment = Alignment; void object->PutDropDownAlignment(enum SftDateAlignConstants Alignment); |
| C | HRESULT object->put_DropDownAlignment(enum SftDateAlignConstants Alignment); |
object
Alignment
Defines how the dropdown is aligned with the field.
| Name | Value | Description |
|---|---|---|
| alignSftDateNear | 0 | Aligned with the field's leading edge |
| alignSftDateFar | 1 | Aligned with the field's trailing edge |
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).
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" });
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"})
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