GrapeCity CalendarGrid for Windows Forms 2.0J
GridLines プロパティ
使用例 

ユーザーが横罫線および縦罫線の設定に使用できる GcCalendarGridGridLines を取得します。
構文
Public ReadOnly Property GridLines As CalendarGridLines
public CalendarGridLines GridLines {get;}
使用例
次のサンプルコードは、GcCalendarGrid の罫線を設定する方法を示します。
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GrapeCity.Win.CalendarGrid;

namespace CalendarGridSampleCode
{
    public  class GridLinesDemo : Form
    {
        private GcCalendarGrid gcCalenderGrid = new GcCalendarGrid();
        public GridLinesDemo()
        {
            this.gcCalenderGrid.Dock = DockStyle.Fill;
            this.Controls.Add(this.gcCalenderGrid);
            this.Load += SetGridLines;
            this.Size = new Size(700, 400);
        }

        private void SetGridLines(object sender, EventArgs e)
        {
            this.gcCalenderGrid.Template.ColumnCount = 2;
            CalendarBorderLine horizontalGridLine = new CalendarBorderLine(Color.SkyBlue, BorderLineStyle.Thin);
            CalendarBorderLine verticalGridLine = new CalendarBorderLine(Color.SkyBlue, BorderLineStyle.Thin);
            CalendarBorderLine horizontalTableGridLine = new CalendarBorderLine(Color.SpringGreen, BorderLineStyle.Double);
            CalendarBorderLine verticalTableGridLine = new CalendarBorderLine(Color.SpringGreen, BorderLineStyle.Double);
            this.gcCalenderGrid.GridLines.HorizontalGridLine = horizontalGridLine;
            this.gcCalenderGrid.GridLines.VerticalGridLine = verticalGridLine;
            this.gcCalenderGrid.GridLines.HorizontalTableGridLine = horizontalTableGridLine;
            this.gcCalenderGrid.GridLines.VerticalTableGridLine = verticalTableGridLine;          
        }

        [STAThreadAttribute]
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.Run(new GridLinesDemo());
        }
    }

}
Imports System.Collections.Generic
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports GrapeCity.Win.CalendarGrid

Namespace CalendarGridSampleCode
    Public Class GridLinesDemo
        Inherits Form
        Private gcCalenderGrid As New GcCalendarGrid()
        Public Sub New()
            Me.gcCalenderGrid.Dock = DockStyle.Fill
            Me.Controls.Add(Me.gcCalenderGrid)
            AddHandler Me.Load, AddressOf SetGridLines
            Me.Size = New Size(700, 400)
        End Sub

        Private Sub SetGridLines(sender As Object, e As EventArgs)
            Me.gcCalenderGrid.Template.ColumnCount = 2
            Dim horizontalGridLine As New CalendarBorderLine(Color.SkyBlue, BorderLineStyle.Thin)
            Dim verticalGridLine As New CalendarBorderLine(Color.SkyBlue, BorderLineStyle.Thin)
            Dim horizontalTableGridLine As New CalendarBorderLine(Color.SpringGreen, BorderLineStyle.[Double])
            Dim verticalTableGridLine As New CalendarBorderLine(Color.SpringGreen, BorderLineStyle.[Double])
            Me.gcCalenderGrid.GridLines.HorizontalGridLine = horizontalGridLine
            Me.gcCalenderGrid.GridLines.VerticalGridLine = verticalGridLine
            Me.gcCalenderGrid.GridLines.HorizontalTableGridLine = horizontalTableGridLine
            Me.gcCalenderGrid.GridLines.VerticalTableGridLine = verticalTableGridLine
        End Sub

        <STAThreadAttribute> _
        Public Shared Sub Main()
            Application.EnableVisualStyles()
            Application.Run(New GridLinesDemo())
        End Sub
    End Class

End Namespace
参照

GcCalendarGrid クラス
GcCalendarGrid メンバ

 

 


c 2008 GrapeCity inc. All rights reserved.