using System; using System.Data; using System.Windows.Forms; using System.ComponentModel; namespace AuxiliaryTextBox ... { /**//// <summary> /// 扩展的文本框,支持数据表绑定,基于拼音码的辅助输入 /// </summary> public class AuliaryTextBox : TextBox ...{ 字段#region 字段 string Empty = string.Empty; ListBox popupListBox = null; // 所要用到的列表框 string displayMember; // 显示字段 string valueMember; // 值字段 DataTable valueTable; // 包含全部数据的数据表 Control nextControl; // 下一个焦点的控件 string spellCode; #endregion 构造器#region 构造器 public AuliaryTextBox() ...{ BackColor = System.Drawing.Color.WhiteSmoke; Text = Empty; this.SetStyle( ControlStyles.Opaque, true ); } #endregion 属性#region 属性 [Category( "JueJue1984" ), Description( " 指定一个辅助输入的ListBox实例,该ListBox将包含所有即将可能被输入的数据." ) ] public ListBox PopupListBox ...{ get...{ return this.popupListBox; } set...{ this.popupListBox = value; } } [Category( "JueJue1984" ), Description( " 指定一个拼音码字段." ) ] public string SpellCode ...{ get...{ return this.spellCode; } set...{ this.spellCode = value; } } [Category( "JueJue1984" ), Description( "指定作为ListBox对象项目属性的显示值字段" ) ] public string DisplayMember ...{ get...{ return this.displayMember; } set...{ this.displayMember = value; } } [Category( "JueJue1984" ), Description( "指定作为ListBox对象项目属性的的实际值字段" ) ] public string ValueMember ...{ get...{ return this.valueMember; } set...{ this.valueMember = value; } } [Browsable( false ) ] public DataTable ValueTable ...{ get...{ return this.valueTable; } set...{ this.valueTable = value; } } [Category( "JueJue1984" ), Description( "下一个Tab的控件" ) ] public Control NextControl .