PowerTools PlusPak for Windows Forms 8.0J
ShowNotes プロパティ
使用例 

カレンダーに含まれる CalendarNote を表示するかどうかを示す値を取得または設定します。
構文
Public Property ShowNotes As Boolean
public bool ShowNotes {get; set;}

プロパティ値

メモを表示する場合は true。それ以外の場合は false。デフォルト値は false です。
使用例

次のサンプルコードは、GcCalendar コントロールにメモを追加する方法を示します。

private void CreateCalendarWithNote()
{
    // Create a GcCalendar.
    GcCalendar gcCalendar1 = new GcCalendar();
    gcCalendar1.Size = new Size(500, 500);
    gcCalendar1.CalendarType = CalendarType.MonthDay;

    // Set the appearance and behavior for NoteArea.
    gcCalendar1.ShowNotes = true;
    gcCalendar1.AllowDragDropNote = true;
    gcCalendar1.NoteArea.NoteAreaAlignment = NoteAreaAlignment.Right;
    gcCalendar1.NoteArea.BackColor = Color.LightBlue;
    gcCalendar1.NoteArea.BorderStyle = BorderStyle.FixedSingle;
    gcCalendar1.NoteArea.SingleBorderColor = Color.DarkBlue;

    // Add 4 notes to today.
    gcCalendar1.Notes.Add(DateTime.Today, new CalendarNote("Note1", null, NoteDisplayMode.Text));
    gcCalendar1.Notes.Add(DateTime.Today, new CalendarNote("Note2", null, NoteDisplayMode.Text));
    gcCalendar1.Notes.Add(DateTime.Today, new CalendarNote("Note3", null, NoteDisplayMode.Text));
    gcCalendar1.Notes.Add(DateTime.Today, new CalendarNote("Note4", null, NoteDisplayMode.Text));

    this.Controls.Add(gcCalendar1);
}
Private Sub CreateCalendarWithNote()
    ' Create a GcCalendar.
    Dim gcCalendar1 As New GcCalendar()
    gcCalendar1.Size = New Size(500, 500)
    gcCalendar1.CalendarType = CalendarType.MonthDay

    ' Set the appearance and behavior for NoteArea.
    gcCalendar1.ShowNotes = True
    gcCalendar1.AllowDragDropNote = True
    gcCalendar1.NoteArea.NoteAreaAlignment = NoteAreaAlignment.Right
    gcCalendar1.NoteArea.BackColor = Color.LightBlue
    gcCalendar1.NoteArea.BorderStyle = BorderStyle.FixedSingle
    gcCalendar1.NoteArea.SingleBorderColor = Color.DarkBlue

    ' Add 4 notes to today.
    gcCalendar1.Notes.Add(DateTime.Today, New CalendarNote("Note1", Nothing, NoteDisplayMode.Text))
    gcCalendar1.Notes.Add(DateTime.Today, New CalendarNote("Note2", Nothing, NoteDisplayMode.Text))
    gcCalendar1.Notes.Add(DateTime.Today, New CalendarNote("Note3", Nothing, NoteDisplayMode.Text))
    gcCalendar1.Notes.Add(DateTime.Today, New CalendarNote("Note4", Nothing, NoteDisplayMode.Text))

    Me.Controls.Add(gcCalendar1)
End Sub
プラットフォーム

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

参照

GcCalendar クラス
GcCalendar メンバ

Send Feedback