PowerTools PlusPak for Windows Forms 8.0J
Notes プロパティ (GcCalendar)
使用例 

カレンダーコントロールに割り当てられたメモのコレクションを取得します。
構文
Public ReadOnly Property Notes As CalendarNoteCollection
public CalendarNoteCollection Notes {get;}

プロパティ値

カレンダーコントロールに割り当てられたメモを表す CalendarNoteCollection
使用例

次のサンプルコードは、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