关于XtraEditors的ComboxEditor、TextboxEditor和ButtonEditor 的使用总结
来源:互联网 发布:视频软件论坛 编辑:程序博客网 时间:2024/05/05 23:09
//关于XtraEditors的ComboxEditor、TextboxEditor和ButtonEditor 的使用总结//使用这三种控件必须引入using DevExpress.XtraEditors;//1、ComBoxEditor: comboBoxEdit_conditions.Properties.Items.AddRange(role);//绑定ComboxEditor 其中Role为数组 comboBoxEdit_conditions.SelectedIndex = 0;//设置默认选中的Item comboBoxEdit_conditions.Properties.ImmediatePopup = true;//按任意字母后ComboxEditor展开 comboBoxEdit_conditions.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;//设置其为只读 this.comboBoxEdit_conditions.Select();//激活控件 同样适用于其他控件 this.comboBoxEdit_conditions.Focus();//设置可编辑焦点 同上 this.comboBoxEdit_conditions.ShowPopup();//使ComboxEditor展开//2、TextboxEditor: this.textEdit_ByCode.Select(); this.textEdit_ByCode.Focus(); this.textEdit_ByCode.SelectAll();//选中Editor区域的所有文本//3、ButtonEditor: this.buttonEdit_Input.Location = new System.Drawing.Point(136, 29); this.buttonEdit_Input.Name = "buttonEdit_Input"; this.buttonEdit_Input.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton()});//添加EditorButton(外观是方框三点Eillips) this.buttonEdit_Input.Properties.Mask.EditMask = "//d{6}//|//d{6}//|//w{2,3}";//正则表达式 this.buttonEdit_Input.Properties.Mask.IgnoreMaskBlank = false; this.buttonEdit_Input.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;//正则类型 this.buttonEdit_Input.Properties.Mask.UseMaskAsDisplayFormat = true; this.buttonEdit_Input.Size = new System.Drawing.Size(168, 21); this.buttonEdit_Input.TabIndex = 0; this.buttonEdit_Input.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.buttonEdit_Input_KeyPress); this.buttonEdit_Input.ButtonPressed += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.buttonEdit_Input_ButtonPressed);//ButtonEditor的按钮事件
0 0
- 关于XtraEditors的ComboxEditor、TextboxEditor和ButtonEditor 的使用总结
- 关于XtraEditors的ComboxEditor、TextboxEditor和ButtonEditor 的使用总结
- DevExpress.XtraEditors.CheckedListBoxControl 控件使用
- 关于&&和&的总结
- 关于php的array_diff和array_diff_assoc的使用总结
- 关于easyui的分页功能使用和总结
- 关于wsus的使用总结
- 关于Combox的使用总结
- 关于信号量的使用总结
- 关于ASIHTTPRequest的使用总结
- 关于Httpclient的使用总结
- 关于JNI的使用总结
- 关于UIMenuController的使用总结
- 关于KVO的使用总结
- 关于debug使用的总结
- 关于示波器的使用总结
- 关于Ajax使用的总结
- 关于Reveal的使用总结
- SDP参数讲解
- iOS多线程问题
- zoj 3203 Light Bulb(计算几何)
- Application和Session以及Server的简单用法
- Java 里把 InputStream 转换成 String 的几种方法
- 关于XtraEditors的ComboxEditor、TextboxEditor和ButtonEditor 的使用总结
- resin 服务器无反应
- windows 句柄
- GCD
- 【剑指offer:】Q27:二叉搜索树与双向链表
- Linux shell脚本基础
- C#版12306抢票软件源码/.NET刷票软件源码
- awk编程——调用方式和分隔符
- 程序存储问题