GrapeCity CalendarGrid for Windows Forms 3.0J
画像を表示する

画像の設定

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);


アニメーションを有効にする

Image型セルは、GIF形式のアニメーションを表示できます。GIF形式のアニメーションを有効にするにはCalendarImageCellType.SupportsAnimationプロパティにTrueを設定します。
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);
関連トピック

 

 


© 2008 GrapeCity inc. All rights reserved.