GrapeCity CalendarGrid for Windows Forms 2.0J
CalendarGcCharMaskCellType クラス
メンバ  使用例 

GcCharMask セルを表します。
構文
Public Class CalendarGcCharMaskCellType 
   Inherits CalendarInputManCellBaseType
public class CalendarGcCharMaskCellType : CalendarInputManCellBaseType 
解説
GcCharMask セルを使用すると、機能的なテキスト入力インタフェースを迅速かつ効率的に設計できます。
使用例
次のサンプルコードは、GcCharMaskCell の使用方法を示します。
using System;
using System.Windows.Forms;
using System.Drawing;
using GrapeCity.Win.CalendarGrid.InputMan;
using GrapeCity.Win.CalendarGrid;

namespace CalendarGridSampleCode
{
    class GcCharMaskCellDemo : Form
    {
        private GcCalendarGrid gcCalendarGrid1 = new GcCalendarGrid();
        private Label label = new Label();

        public GcCharMaskCellDemo()
        {
            this.Text = "GcCharMaskCell Demo";
            this.Size = new Size(350, 300);

            // Add GcCalendarGrid to form
            this.gcCalendarGrid1.Dock = DockStyle.Fill;
            this.Controls.Add(this.gcCalendarGrid1);

            this.label.Dock = DockStyle.Bottom;
            this.label.Height = 50;
            this.label.BackColor = SystemColors.Info;
            this.label.Text = "You can only input upper case, and only input 3 chars.";
            this.Controls.Add(label);

            this.Load += Form1_Load;

            this.StartPosition = FormStartPosition.CenterScreen;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            CalendarGcCharMaskCellType gcCharMaskCell1 = new CalendarGcCharMaskCellType();
            //Allow the GcCharMaskCell to accept upper case alphabet(A-Z).
            gcCharMaskCell1.Format = "A";
            gcCharMaskCell1.CharBoxes.Clear();
            //Add some CharBoxes to GcCharMaskCell.
            gcCharMaskCell1.CharBoxes.AddRange(new InputBox[] { new InputBox(), new InputBox(), new InputBox() });

            CalendarTemplate template1 = CalendarTemplate.CreateDefaultTemplate();
            template1.Content[1, 0].CellType = gcCharMaskCell1;
            template1.Content[2, 0].CellType = gcCharMaskCell1.Clone();

            gcCalendarGrid1.Template = template1;
        }

        [STAThreadAttribute()]
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.Run(new GcCharMaskCellDemo());
        }
    }
}
Imports System.Windows.Forms
Imports System.Drawing
Imports GrapeCity.Win.CalendarGrid.InputMan
Imports GrapeCity.Win.CalendarGrid

Namespace CalendarGridSampleCode
    Class GcCharMaskCellDemo
        Inherits Form
        Private gcCalendarGrid1 As New GcCalendarGrid()
        Private label As New Label()

        Public Sub New()
            Me.Text = "GcCharMaskCell Demo"
            Me.Size = New Size(350, 300)

            ' Add GcCalendarGrid to form
            Me.gcCalendarGrid1.Dock = DockStyle.Fill
            Me.Controls.Add(Me.gcCalendarGrid1)

            Me.label.Dock = DockStyle.Bottom
            Me.label.Height = 50
            Me.label.BackColor = SystemColors.Info
            Me.label.Text = "You can only input upper case, and only input 3 chars."
            Me.Controls.Add(label)

            AddHandler Me.Load, AddressOf Form1_Load

            Me.StartPosition = FormStartPosition.CenterScreen
        End Sub

        Private Sub Form1_Load(sender As Object, e As EventArgs)
            Dim gcCharMaskCell1 As New CalendarGcCharMaskCellType()
            'Allow the GcCharMaskCell to accept upper case alphabet(A-Z).
            gcCharMaskCell1.Format = "A"
            gcCharMaskCell1.CharBoxes.Clear()
            'Add some CharBoxes to GcCharMaskCell.
            gcCharMaskCell1.CharBoxes.AddRange(New InputBox() {New InputBox(), New InputBox(), New InputBox()})

            Dim template1 As CalendarTemplate = CalendarTemplate.CreateDefaultTemplate()
            template1.Content(1, 0).CellType = gcCharMaskCell1
            template1.Content(2, 0).CellType = gcCharMaskCell1.Clone()

            gcCalendarGrid1.Template = template1
        End Sub

        <STAThreadAttribute> _
        Public Shared Sub Main()
            Application.EnableVisualStyles()
            Application.Run(New GcCharMaskCellDemo())
        End Sub
    End Class
End Namespace
継承階層

System.Object
   GrapeCity.Win.CalendarGrid.CalendarCellType
      GrapeCity.Win.CalendarGrid.InputMan.CalendarInputManCellBaseType
         GrapeCity.Win.CalendarGrid.InputMan.CalendarGcCharMaskCellType

参照

CalendarGcCharMaskCellType メンバ
GrapeCity.Win.CalendarGrid.InputMan 名前空間

 

 


c 2008 GrapeCity inc. All rights reserved.