作成日: 2019/04/25 最終更新日: 2019/04/25
文書種別
使用方法
詳細
GcNumber型セルのExitOnLastCharプロパティをTrueに設定することで、入力された値がMaxValueプロパティにより定義された最大桁数に達すると、自動的に次のセルへ移動します。
[Visual Basic]
[C#]
[Visual Basic]
Imports GrapeCity.Win.MultiRow
Imports GrapeCity.Win.MultiRow.InputMan
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' セル型の作成
Dim numberCell As New GcNumberCell
numberCell.Fields.SetFields("###,,,-,")
numberCell.DisplayFields.Clear()
numberCell.DisplayFields.AddRange("###,,,-,")
numberCell.MaxValue = 999
numberCell.MinValue = 0
' 最大桁数の入力後に自動的に隣のセルに移動
numberCell.ExitOnLastChar = True
Dim textCell As New TextBoxCell()
textCell.Name = "textCell"
' MultiRowの設定
GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {numberCell, textCell})
GcMultiRow1.RowCount = 5
End Sub
End Class
[C#]
using GrapeCity.Win.MultiRow.InputMan;
using GrapeCity.Win.MultiRow;
namespace sample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// セル型の作成
GcNumberCell numberCell = new GcNumberCell();
numberCell.Fields.SetFields("###,,,-,");
numberCell.DisplayFields.Clear();
numberCell.DisplayFields.AddRange("###,,,-,");
numberCell.MaxValue = 999;
numberCell.MinValue = 0;
// 最大桁数の入力後に自動的に隣のセルに移動
numberCell.ExitOnLastChar = true;
TextBoxCell textCell = new TextBoxCell();
textCell.Name = "textCell";
// MultiRowの設定
gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { numberCell, textCell });
gcMultiRow1.RowCount = 5;
}
}
}
旧文書番号
83919