PowerTools CalendarGrid for Windows Forms 1.0J
垂直表示と水平表示

リストビュースタイルでは、既定で日のレイアウトが水平方向に並べて表示されます。CalendarListView.OrientationプロパティをVerticalに設定すると日を垂直方向に並べることができます。

Imports GrapeCity.Win.CalendarGrid

Dim template As New CalendarTemplate()
template.RowHeaderColumnCount = 3
template.ColumnCount = 10
template.RowCount = 1
template.CornerHeader.Rows(0).Cells(0).ColumnSpan = 3
template.RowHeader.Rows(0).Cells(0).DateFormat = "{Month}"
template.RowHeader.Rows(0).Cells(0).AutoMergeMode = AutoMergeMode.Vertical
template.RowHeader.Rows(0).Cells(1).DateFormat = "{Day}日"
template.RowHeader.Rows(0).Cells(1).CellStyleName = "defaultStyle"
template.RowHeader.Rows(0).Cells(2).DateFormat = "{ShortestDayOfWeek}"
template.RowHeader.Rows(0).Cells(2).CellStyleName = "defaultStyle"
For i As Integer = 0 To template.RowHeader.ColumnCount - 1
    template.RowHeader.Columns(i).Width = 30
Next
For i As Integer = 0 To template.Content.ColumnCount - 1
    template.Content.Columns(i).Width = 20
Next

GcCalendarGrid1.Template = template

Dim listView As New CalendarListView()
listView.Orientation = Orientation.Vertical
GcCalendarGrid1.CalendarView = listView
using GrapeCity.Win.CalendarGrid;

var template = new CalendarTemplate();
template.RowHeaderColumnCount = 3;
template.ColumnCount = 10;
template.RowCount = 1;
template.CornerHeader.Rows[0].Cells[0].ColumnSpan = 3;
template.RowHeader.Rows[0].Cells[0].DateFormat = "{Month}";
template.RowHeader.Rows[0].Cells[0].AutoMergeMode = AutoMergeMode.Vertical;
template.RowHeader.Rows[0].Cells[1].DateFormat = "{Day}日";
template.RowHeader.Rows[0].Cells[1].CellStyleName = "defaultStyle";
template.RowHeader.Rows[0].Cells[2].DateFormat = "{ShortestDayOfWeek}";
template.RowHeader.Rows[0].Cells[2].CellStyleName = "defaultStyle";
for (int i = 0; i < template.RowHeader.ColumnCount; i++)
{
    template.RowHeader.Columns[i].Width = 30;
}
for (int i = 0; i < template.Content.ColumnCount; i++)
{
    template.Content.Columns[i].Width = 20;
}

gcCalendarGrid1.Template = template;

var listView = new CalendarListView();
listView.Orientation = Orientation.Vertical;
gcCalendarGrid1.CalendarView = listView;

参照

 

 


© 2014 GrapeCity inc. All rights reserved.