场景

WinForm 应用,使用了 DevExpress.XtraEditors.TextEdit 控件的 KeyPress 和 Leave 事件。
期望在 TextEdit 上按下回车键或者当 TextEdit 失去焦点时进行相关验证并弹窗提示。

问题

弹窗显示并关闭后,TextEdit 默认是 Focused 的状态,如果这时想切换至其他模块,会触发 Leave 事件进行二次弹窗。

解决

TextEdit 没有 LostFocus 方法。
当进行第一次弹窗时,设置其他控件获取焦点,这样弹窗关闭的时候 TextEdit 就不是 Focused 的状态了。
我这里使用的是 TextEdit 所在的容器 GroupControl:GroupControlName.Focus();

[DevExpress] - 使得 XtraEditors.TextEdit 失去焦点(LostFocus)的方法的更多相关文章

  1. DevExpress实现为TextEdit设置水印文字的方法

    设置水印与消除水印 public static void SetWatermark(TextEdit textEdit, string watermark) { textEdit.Properties ...

  2. DevExpress实现为TextEdit设置水印文字

    本文实例展示了DevExpress实现为TextEdit设置水印文字的方法,是一个很实用的技巧.分享给大家供大家参考. 转自 http://blog.csdn.net/yh0503/article/d ...

  3. DevExpress.XtraEditors.TextEdit 设为密码输入框

    DevExpress.XtraEditors.TextEdit 设为密码输入框,解决办法: 设计窗口-->属性Properties-->Mask节点-->PasswordChar输入 ...

  4. Dev TreeList设置焦点失败解决方法

    问题描述 对TreeList初始化之后,设置treelist的焦点节点时,发现每次初始化控件的时不能正确的绑定焦点节点,第二次点开treelist的时候才会正常的设置目标节点为焦点节点. 截图 解决方 ...

  5. 更改DEVExpress的Column的DisplayFormat为自定义的方法。

    更改DEVExpress的Column的DisplayFormat为自定义的方法. public partial class Form1 : XtraForm { public Form1() { I ...

  6. WinForm中变Enter键为Tab键实现焦点转移的方法

    if (e.KeyCode == Keys.Enter) { //this.SelectNextControl(this.ActiveControl,true, true, true, true); ...

  7. jquery ui dialog 中使用select2 导致select2的input失去焦点的解决方法

    在jqueryUI 的dialog中使用select2,select2的input search无论怎样都获取不到焦点? 解决方法: $(document).ready(function () { $ ...

  8. DevExpress 12.1 换肤 超级简单的方法(2013-11-5版)

    本例子是按照DevExpress 12.1 版本 进行演示.请先准备好DevExpress.BonusSkins.v12.1.dll 和DevExpress.Utils.v12.1.dll 1.首先添 ...

  9. DevExpress 控件汉化代码和使用方法

    DevExpress 第三方控件汉化的全部代码和使用方法   DevExpress.XtraEditors.Controls  此控件包中包含的控件最多,包括文本框,下拉列表,按钮,等等        ...

随机推荐

  1. windows下的上帝模式,很好用,细想,很恐怖啊

    原文地址:https://blog.csdn.net/qq_43371556/article/details/101210501 上帝模式,即"God Mode”,或称为“完全控制面板”.是 ...

  2. element ui table组件自定义合计栏,后台给的数据

    合计的数据是后台传的,所以用table组件自定义一行用来合计 <el-table border fit v-loading.body="listLoading" elemen ...

  3. 怎么用switchhost

    第一步:打开exe, 第二部:在 My hosts 里面直接添加路径 106.75.131.183 npm.kuaizitech.cn 第三部 :打开my hosts 保护好眼睛,早睡早起,多运动,k ...

  4. input的禁止标签

    <body> <input type="text" name="" value="你好" disabled="d ...

  5. SelectKBest

    https://www.e-learn.cn/content/python/2198918from sklearn.feature_selection import SelectKBest,f_cla ...

  6. rm: cannot remove `xxx': Read-only file system

    linux 中出现 Read-only file system - Aidon博客 - CSDN博客 https://blog.csdn.net/u010839779/article/details/ ...

  7. tomcat的AJP(定向包协议)协议

    由于tomcat的html和图片解析功能相对其他服务器如apche等较弱,所以,一般都是集成起来使用,只有jsp和servlet服务交由tomcat处理,而tomcat和其他服务器的集成,就是通过aj ...

  8. 在windows上编译chrome浏览器Building Chromium for Windows

    web端用webRTC实现的一对一视频,互动直播和会议.https://github.com/starrtc/android-demo Chromium requires Visual Studio ...

  9. Linux防火墙白名单设置

    在linux系统中安装yum install iptables-services 然后 vi /etc/sysconfig/iptables # Generated by iptables-save ...

  10. 时序数据库技术体系 – 初识InfluxDB(原理)

    原贴地址:http://hbasefly.com/2017/12/08/influxdb-1/?qytefg=c4ft23 在上篇文章<时序数据库体系技术 – 时序数据存储模型设计>中笔者 ...