GrapeCity CalendarGrid for Windows Forms 2.0J
週と週の間にスペースを追加する

次の図のように週と週の間にスペースを追加するには、空白のセルを用意してこのセルを選択禁止(CalendarCell.CanFocus = False)に設定します。

Imports GrapeCity.Win.CalendarGrid

Dim template As New CalendarTemplate()
template.RowHeaderVisible = False
template.ColumnCount = 1
template.RowCount = 4

template.ColumnHeader(0, 0).DateFormat = "{DayOfWeek}"
template.ColumnHeader(0, 0).DateFormatType = CalendarDateFormatType.CalendarGrid
template.ColumnHeader(0, 0).CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter

template.Content(0, 0).DateFormat = "d日"
template.Content(0, 0).DateFormatType = CalendarDateFormatType.DotNet
GcCalendarGrid1.GridLines.HorizontalTableGridLine = new CalendarBorderLine(Color.Empty, BorderLineStyle.None)
GcCalendarGrid1.GridLines.VerticalTableGridLine = new CalendarBorderLine(Color.Empty, BorderLineStyle.None)

template.Content(3, 0).CellStyle.BackColor = Color.LightBlue
template.Content(3, 0).CanFocus = false

template.Content.Rows(3).Height = 5
template.Content.Columns(0).Width = 100

gcCalendarGrid1.Template = template

Dim weekView As New CalendarWeekView()
weekView.WeekCount = 4
GcCalendarGrid1.CalendarView = weekView
using GrapeCity.Win.CalendarGrid;

var template = new CalendarTemplate();
template.RowHeaderVisible = false;
template.ColumnCount = 1;
template.RowCount = 4;

template.ColumnHeader[0, 0].DateFormat = "{DayOfWeek}";
template.ColumnHeader[0, 0].DateFormatType = CalendarDateFormatType.CalendarGrid;
template.ColumnHeader[0, 0].CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter;

template.Content[0, 0].DateFormat = "d日";
template.Content[0, 0].DateFormatType = CalendarDateFormatType.DotNet;

gcCalendarGrid1.GridLines.HorizontalTableGridLine = new CalendarBorderLine(Color.Empty, BorderLineStyle.None);
gcCalendarGrid1.GridLines.VerticalTableGridLine = new CalendarBorderLine(Color.Empty, BorderLineStyle.None);

template.Content[3, 0].CellStyle.BackColor = Color.LightBlue;
template.Content[3, 0].CanFocus = false;

template.Content.Rows[3].Height = 5;
template.Content.Columns[0].Width = 100;

gcCalendarGrid1.Template = template;

var weekView = new CalendarWeekView();
weekView.WeekCount = 4;
gcCalendarGrid1.CalendarView = weekView;
参照

 

 


© 2008 GrapeCity inc. All rights reserved.