GrapeCity.Win.MultiRow.v80 アセンブリ > GrapeCity.Win.MultiRow.InputMan 名前空間 : GcTextBoxCell クラス |
Public Class GcTextBoxCell Inherits InputManCellBase
public class GcTextBoxCell : InputManCellBase
using System; using System.Windows.Forms; using System.Drawing; namespace GrapeCity.Win.MultiRow.InputMan.SampleCode { class GcTextBoxCellDemo : Form { private GcMultiRow gcMultiRow1 = new GcMultiRow(); private Label label = new Label(); public GcTextBoxCellDemo() { this.Text = "GcTextBoxCell Demo"; this.Size = new Size(350, 300); // Add MultiRow to form this.gcMultiRow1.Dock = DockStyle.Fill; this.Controls.Add(this.gcMultiRow1); this.label.Dock = DockStyle.Bottom; this.label.Height = 50; this.label.BackColor = SystemColors.Info; this.label.Text = " You can only input upper and lower case alphabet, as well as the symbols. Except '#', '@' and '*' chars; The DropDownButton will show when GcTextBoxCell is CurrentCell, and you can switch the DropDownList through hitting the F6 in edit mode."; this.Controls.Add(label); this.Load += new EventHandler(Form1_Load); this.StartPosition = FormStartPosition.CenterScreen; } private void Form1_Load(object sender, EventArgs e) { // Create an instance of a GcTextBox control. GcTextBoxCell gcTextBoxCell1 = new GcTextBoxCell(); // Accept upper and lower case alphabet, as well as the symbols. Except '#', '@' and '*' chars. gcTextBoxCell1.Format = @"aA@^\#\@*"; // The GcTextBox will try to convert the invalid char to valid char automatically. gcTextBoxCell1.AutoConvert = true; DropDownButton dropDownButton1 = new DropDownButton(); dropDownButton1.Visible = CellButtonVisibility.ShowForCurrentCell; gcTextBoxCell1.SideButtons.Add(dropDownButton1); //Hit the "F6" to switch the DropDownList. gcTextBoxCell1.ShortcutKeys.Add(Keys.F6, "SwitchDropDown"); Template template1 = Template.CreateGridTemplate(new Cell[] { gcTextBoxCell1, gcTextBoxCell1.Clone() as Cell }, 160, AutoGenerateGridTemplateStyles.ColumnHeader | AutoGenerateGridTemplateStyles.RowHeaderAutoNumber); gcMultiRow1.Template = template1; gcMultiRow1.RowCount = 3; } [STAThreadAttribute()] public static void Main() { Application.EnableVisualStyles(); Application.Run(new GcTextBoxCellDemo()); } } }
Imports System Imports System.Windows.Forms Imports System.Drawing Namespace GrapeCity.Win.MultiRow.InputMan.SampleCode Class GcTextBoxCellDemo Inherits Form Private gcMultiRow1 As New GcMultiRow() Private label As New Label() Public Sub New() Me.Text = "GcTextBoxCell Demo" Me.Size = New Size(350, 300) ' Add MultiRow to form Me.gcMultiRow1.Dock = DockStyle.Fill Me.Controls.Add(Me.gcMultiRow1) Me.label.Dock = DockStyle.Bottom Me.label.Height = 60 Me.label.BackColor = SystemColors.Info Me.label.Text = " You can only input upper and lower case alphabet, as well as the symbols. Except '#', '@' and '*' chars; The DropDownButton will show when GcTextBoxCell is CurrentCell, and you can switch the DropDownList through hitting the F6 in edit mode." Me.Controls.Add(label) Me.StartPosition = FormStartPosition.CenterScreen End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load ' Create an instance of a GcTextBox control. Dim gcTextBoxCell1 As New GcTextBoxCell() ' Accept upper and lower case alphabet, as well as the symbols. Except '#', '@' and '*' chars. gcTextBoxCell1.Format = "aA@^\#\@*" ' The GcTextBox will try to convert the invalid char to valid char automatically. gcTextBoxCell1.AutoConvert = True Dim dropDownButton1 As New DropDownButton() dropDownButton1.Visible = CellButtonVisibility.ShowForCurrentCell gcTextBoxCell1.SideButtons.Add(dropDownButton1) 'Hit the "F6" to switch the DropDownList. gcTextBoxCell1.ShortcutKeys.Add(Keys.F6, "SwitchDropDown") Dim template1 As Template = Template.CreateGridTemplate(New Cell() {gcTextBoxCell1, TryCast(gcTextBoxCell1.Clone(), Cell)}, 160, AutoGenerateGridTemplateStyles.ColumnHeader Or AutoGenerateGridTemplateStyles.RowHeaderAutoNumber) gcMultiRow1.Template = template1 gcMultiRow1.RowCount = 3 End Sub <STAThreadAttribute()> _ Public Shared Sub Main() Application.EnableVisualStyles() Application.Run(New GcTextBoxCellDemo()) End Sub End Class End Namespace
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
GrapeCity.Win.MultiRow.Cell
GrapeCity.Win.MultiRow.InputMan.InputManCellBase
GrapeCity.Win.MultiRow.InputMan.GcTextBoxCell