PowerTools MultiRow for Windows Forms 8.0J
CalendarTrailingForeColor プロパティ
使用例 

カレンダーの隣接日の前景色を取得または設定します。
構文
Public Property CalendarTrailingForeColor As Color
public Color CalendarTrailingForeColor {get; set;}

プロパティ値

カレンダーの隣接日の前景色を表すSystem.Drawing.Color値。既定値はSystem.Drawing.SystemColors.GrayTextです。
解説
Color.Emptyを設定すると、このプロパティは自動的に既定値に調整されます。
使用例
次のサンプルコードは、日時ピッカー型セルの動作または外観をカスタマイズする方法を示します。このサンプルコードは、DateTimePickerCellクラスに示されている詳細なコード例の一部を抜粋したものです。
DateTimePickerCell CreateCustomCalendarStyleAndFormat()
{
    DateTimePickerCell dateTimePickerCell1 = new DateTimePickerCell();

    dateTimePickerCell1.Value = DateTime.Now;

    dateTimePickerCell1.Size = new Size(120, 21);

    dateTimePickerCell1.CustomFormat = "yyyy/MM";

    dateTimePickerCell1.Format = DateTimePickerFormat.Custom;

    dateTimePickerCell1.CalendarFont = new Font(Control.DefaultFont, FontStyle.Bold);

    dateTimePickerCell1.CalendarForeColor = Color.Red;

    dateTimePickerCell1.CalendarMonthBackground = Color.Blue;

    dateTimePickerCell1.CalendarTitleBackColor = Color.Black;

    dateTimePickerCell1.CalendarTitleForeColor = Color.White;

    dateTimePickerCell1.CalendarTrailingForeColor = Color.Yellow;

    dateTimePickerCell1.DropDownAlign = LeftRightAlignment.Right;

    return dateTimePickerCell1;
}
Private Function CreateCustomCalendarStyleAndFormat() As DateTimePickerCell
    Dim dateTimePickerCell1 As New DateTimePickerCell()

    dateTimePickerCell1.Value = DateTime.Now

    dateTimePickerCell1.Size = New Size(120, 21)

    dateTimePickerCell1.CustomFormat = "yyyy/MM"

    dateTimePickerCell1.Format = DateTimePickerFormat.Custom

    dateTimePickerCell1.CalendarFont = New Font(Control.DefaultFont, FontStyle.Bold)

    dateTimePickerCell1.CalendarForeColor = Color.Red

    dateTimePickerCell1.CalendarMonthBackground = Color.Blue

    dateTimePickerCell1.CalendarTitleBackColor = Color.Black

    dateTimePickerCell1.CalendarTitleForeColor = Color.White

    dateTimePickerCell1.CalendarTrailingForeColor = Color.Yellow

    dateTimePickerCell1.DropDownAlign = LeftRightAlignment.Right

    Return dateTimePickerCell1
End Function
参照

DateTimePickerCell クラス
DateTimePickerCell メンバ

 

 


© 2008-2015 GrapeCity inc. All rights reserved.