Defines the number of months shown one below the other (1 to 12).
Get
| C# | int Months = object.MonthsDown; |
| VB.NET | Months = object.MonthsDown As Integer |
| C++ | long Months = object->MonthsDown; long Months = object->GetMonthsDown(); |
| C | HRESULT object->get_MonthsDown(long* Months); |
Put
| C# | int object.MonthsDown = Months; |
| VB.NET | object.MonthsDown = Months As Integer |
| C++ | long object->MonthsDown = Months; void object->PutMonthsDown(long Months); |
| C | HRESULT object->put_MonthsDown(long Months); |
object
Months
Defines the number of months shown one below the other (1 to 12).
The MonthsDown property defines the number of rows of months a calendar shows. The default is 1. MonthsAcross defines the number of months in each row. A value that is not between 1 and 12 causes an error. p A month calendar control that sizes itself (AutoSize, the default) takes the size of all months. p The setting applies to a month calendar control and to the dropdown calendar of a date field control.
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" });
comboFirstDay.SelectedIndex = (int)cal.FirstDayOfWeek;
comboViews.Items.AddRange(new object[] { "All", "Month and year", "Month only" });
comboViews.SelectedIndex = Math.Max(0, Array.IndexOf(viewSets, cal.AllowedViews));
checkTrailing.Checked = cal.ShowTrailingDates;
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"})
comboFirstDay.SelectedIndex = CInt(cal.FirstDayOfWeek)
comboViews.Items.AddRange(New Object() {"All", "Month and year", "Month only"})
comboViews.SelectedIndex = Math.Max(0, Array.IndexOf(viewSets, cal.AllowedViews))
checkTrailing.Checked = cal.ShowTrailingDates
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;
case IDC_WEEKNUMBERS:
ForEachControl([&](auto& ctl) {
ctl->Calendar->ShowWeekNumbers = sel > 0 ? VARIANT_TRUE : VARIANT_FALSE;
ctl->Calendar->WeekNumberRule = sel == 2 ? weekRuleSftDateISO8601 : weekRuleSftDateCulture;
});
break;See Also SftDateCalendar Object | Object Hierarchy | Calendar Layout