GrapeCity CalendarGrid for Windows Forms 2.0J > CalendarGridの使い方 > セル型 > Image型セル(CalendarImageCellType) > 画像を表示する |
Image型セルに画像を表示するには、CalendarCell.Valueプロパティに画像型のデータを設定します。
Imports GrapeCity.Win.CalendarGrid Dim today As DateTime = DateTime.Today Dim imageCellType As New CalendarImageCellType() GcCalendarGrid1.Content(today).Rows(1).Cells(0).CellType = imageCellType.Clone() GcCalendarGrid1.Content(today).Rows(1).Cells(0).Value = new Bitmap("C:\test.png") GcCalendarGrid1.ScrollIntoView(today)
using GrapeCity.Win.CalendarGrid; var today = DateTime.Today; var imageCellType = new CalendarImageCellType(); gcCalendarGrid1.Content[today].Rows[1].Cells[0].CellType = imageCellType.Clone(); gcCalendarGrid1.Content[today].Rows[1].Cells[0].Value = new Bitmap(@"C:\test.png"); gcCalendarGrid1.ScrollIntoView(today);
Imports GrapeCity.Win.CalendarGrid Dim today As DateTime = DateTime.Today Dim imageCellType As New CalendarImageCellType() imageCellType.SupportsAnimation = True GcCalendarGrid1.Content(today).Rows(1).Cells(0).CellType = imageCellType.Clone() GcCalendarGrid1.Content(today).Rows(1).Cells(0).Value = New Bitmap("C:\test.gif") GcCalendarGrid1.ScrollIntoView(today)
using GrapeCity.Win.CalendarGrid; var today = DateTime.Today; var imageCellType = new CalendarImageCellType(); imageCellType.SupportsAnimation = true; gcCalendarGrid1.Content[today].Rows[1].Cells[0].CellType = imageCellType.Clone(); gcCalendarGrid1.Content[today].Rows[1].Cells[0].Value = new Bitmap(@"C:\test.gif"); gcCalendarGrid1.ScrollIntoView(today);