textbox不支持Ctrl+A
You might be looking for the ShortcutsEnabled property. Setting it to true
would allow your text boxes to implement the Ctrl+A shortcut (among others). From the documentation:
Use the
ShortcutsEnabled
property to enable or disable the following shortcut key combinations:
CTRL+Z
CTRL+E
CTRL+C
CTRL+Y
CTRL+X
CTRL+BACKSPACE
CTRL+V
CTRL+DELETE
CTRL+A
SHIFT+DELETE
CTRL+L
SHIFT+INSERT
CTRL+R
EDIT:
However, the documentation states:
The TextBox control does not support the CTRL+A shortcut key when the Multiline property value is true.
You will probably have to use another subclass of TextBoxBase
, such as RichTextBox, for that to work.
http://stackoverflow.com/questions/16197915/how-can-i-allow-ctrla-with-textbox-in-winform
Like other answers indicate, Application.EnableVisualStyles()
should be called. Also the TextBox.ShortcutsEnabled
should be set to true
.
But if your TextBox.Multiline
is enabled then Ctrl+A will not work (see MSDN documentation). Using RichTextBox
instead will get around the problem.
textbox不支持Ctrl+A的更多相关文章
- 解决winfrom下TextBox不支持透明背景色
不知道微软扯什么拉鸡蛋子,居然有控件不支持透明,我实在想喷设计的人脑残.尤其可恨的是TextBox不支持,更可恨的是直到最新版.net4.6也不支持.源码又看不见,具体实现细节都不知道,谁能改得动?这 ...
- 【WP8】让TextBox文本支持滑动(Scroll)
通过修改样式让TextBox支持文本滑动 在Silverlight上,TextBox是有文本滚动的功能的,当TextBox的文本过长时,可以进行拖动的,TextBox使用 VerticalScroll ...
- 在.net中实现在textbox中按ctrl+enter进行数据的提交
textbox.Attributes.Add("onKeydown", "if(event.ctrlKey&&event.keyCode == 13){d ...
- 解决 aspx 页面 TextBox 不支持 type="number"
安装 framework 4 并且打上补丁 Microsoft .NET Framework 4 可靠性更新 1 (KB2533523) https://www.microsoft.com/zh-cn ...
- JS-制作留言提交系统(支持ctrl+回车)
弹出键值说明: //console.log(ev.keyCode)//回车:13//ctrl:17 <!DOCTYPE html> <html> <head> &l ...
- 让input支持 ctrl v上传粘贴图片? 让input支持QQ截图或剪切板中的图像数据(Java实现保存)
原理:监听粘贴 → 获取粘贴内容 → 将内容上传 → 抓取后返回替换至input 我们在生产中用到的界面: 测试地址 http://sms.reyo.cn 用户名:aa 密码:123456 以下是PH ...
- 单个控件textbox只支持在英文状态下输入所需的字符串
也就是它的属性: Imemode的属性 设置成off就可以了 ,就不会受到所输入的中文汉字了.
- Winform 使用热键功能实现Ctrl+C和Ctrl+V复制粘贴功能
当我们使用winform控件的时候,会发现这些控件(比如Label)不支持Ctrl+c 复制和Ctrl+v 快捷键复制粘贴功能,如果我们需要实现这个功能改怎么做呢? 1. 首先我们创建一个winfor ...
- Windows Phone 的 TextBox 的实现 PropertyChanged
比如,View 的文本框 TextBox1 绑定了 ViewModel 的 Msg 属性, 当想把文本框输入的内容输入过程中实时更新到绑定的 Msg ,在Windows Phone 中是无法通过设置 ...
随机推荐
- MVC C# 调用存储过程
SqlParameter[] param ={ new SqlParameter("@SignInfoId ",SqlDbType.Int), new SqlParameter(& ...
- matlab实现高斯消去法、LU分解
朴素高斯消去法: function x = GauElim(n, A, b) if nargin < 2 for i = 1 : 1 : n for j = 1 : 1 : n A(i, j) ...
- C#位操作符
位操作符是对数据按二进制位进行运算的操作符.c#位操作符包括: 按位与 & 按位或 | 按位取反 ~ 左移 << 右移 >> 例如: 6:00000110 3:00 ...
- ORACLE 变量定义
DECLARE v_productid productinfo.productid%TYPE; v_productname ); v_productprice ,); v_quantity ); v_ ...
- Notes of the scrum meeting(2013/10/20)
软工项目组buaa_smile确定自由项目主题及实现功能的scrum meeting meeting time:7:30~9:00p.m.,October 20th,2013 meeting plac ...
- 使用Forms进行身份验证(Asp.net)
1.背景 以往项目登陆后的用户信息都是存放在session中,但session有一个问题就是读取的时候需要先实例化所在类,在调用对象()如果用static修饰,则可能到时多次登陆sessio ...
- Mongo常用操作
设置登陆验证 进入Mongo添加用户 db.addUser('root','123456') 编辑Mongo配置文件 vi /etc/mongod.conf 找到#auth = true ...
- Java 理论和实践: 了解泛型
转载自 : http://www.ibm.com/developerworks/cn/java/j-jtp01255.html 表面上看起来,无论语法还是应用的环境(比如容器类),泛型类型(或者泛型) ...
- Sudoku Solver
Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by th ...
- poj 2253 Frogger (最短路变种,连通图的最长边)
题目 这里的dijsktra的变种代码是我看着自己打的,终于把代码和做法思路联系上了,也就是理解了算法——看来手跟着画一遍真的有助于理解. #define _CRT_SECURE_NO_WARNING ...