PowerTools SPREAD for Windows Forms 10.0J
ScrollRate プロパティ (DropDownCalendar)


スクロール量を取得または設定します。
構文
'Declaration
 
Public Property ScrollRate As Integer
'使用法
 
Dim instance As DropDownCalendar
Dim value As Integer
 
instance.ScrollRate = value
 
value = instance.ScrollRate
public int ScrollRate {get; set;}

プロパティ値

1回のスクロールで移動する月の数を表す正の数。
デフォルト値は1です。
解説
スクロール量は、ユーザーがスクロール矢印をクリックしたときにコントロールの表示が移動する月の数です。
次のサンプルコードは、休日情報を追加してスクロール量を設定します。
GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType gcDateTimeCell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
gcDateTimeCell1.DropDownCalendar.ScrollRate = 2;
gcDateTimeCell1.DropDownCalendar.ScrollTipAlign = GrapeCity.Win.Spread.InputMan.CellType.ScrollTipAlignment.BottomRight;
GrapeCity.Win.Spread.InputMan.CellType.HolidayStyle nonePublicHoliday = new GrapeCity.Win.Spread.InputMan.CellType.HolidayStyle("None Public Holiday");
nonePublicHoliday.SubStyle = new GrapeCity.Win.Spread.InputMan.CellType.SubStyle(Color.White, Color.Red, true, false);
nonePublicHoliday.Holidays.Add((GrapeCity.Win.Spread.InputMan.CellType.IHoliday)new GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekHoliday("Mothers Day", GrapeCity.Win.Spread.InputMan.CellType.MonthFlags.May, GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekInMonthFlags.Second, GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekFlags.Sunday));
nonePublicHoliday.Holidays.Add((GrapeCity.Win.Spread.InputMan.CellType.IHoliday)new GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekHoliday("Fathers Day",GrapeCity.Win.Spread.InputMan.CellType.MonthFlags.June, GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekInMonthFlags.Third,GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekFlags.Sunday));
gcDateTimeCell1.DropDownCalendar.HolidayStyles.Add("OtherHoliday", nonePublicHoliday);
gcDateTimeCell1.DropDownCalendar.ActiveHolidayStyles = new String[] { "OtherHoliday"};
fpSpread1.Sheets[0].Cells[1, 1].CellType = gcDateTimeCell1;
Dim gcDateTimeCell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
gcDateTimeCell1.DropDownCalendar.ScrollRate = 2
gcDateTimeCell1.DropDownCalendar.ScrollTipAlign = GrapeCity.Win.Spread.InputMan.CellType.ScrollTipAlignment.BottomRight
Dim nonePublicHoliday As New GrapeCity.Win.Spread.InputMan.CellType.HolidayStyle("None Public Holiday")
nonePublicHoliday.SubStyle = New GrapeCity.Win.Spread.InputMan.CellType.SubStyle(Color.White, Color.Red, True, False)
nonePublicHoliday.Holidays.Add(DirectCast(New GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekHoliday("Mothers Day", GrapeCity.Win.Spread.InputMan.CellType.MonthFlags.May, GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekInMonthFlags.Second, GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekFlags.Sunday), GrapeCity.Win.Spread.InputMan.CellType.IHoliday))
nonePublicHoliday.Holidays.Add(DirectCast(New GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekHoliday("Fathers Day", GrapeCity.Win.Spread.InputMan.CellType.MonthFlags.June, GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekInMonthFlags.Third, GrapeCity.Win.Spread.InputMan.CellType.DayOfWeekFlags.Sunday), GrapeCity.Win.Spread.InputMan.CellType.IHoliday))
gcDateTimeCell1.DropDownCalendar.HolidayStyles.Add("OtherHoliday", nonePublicHoliday)
gcDateTimeCell1.DropDownCalendar.ActiveHolidayStyles = New String() {"OtherHoliday"}
FpSpread1.Sheets(0).Cells(1, 1).CellType = gcDateTimeCell1
参照

DropDownCalendar クラス
DropDownCalendar メンバ

 

 


© 2004-2017, GrapeCity inc. All rights reserved.