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
ShortcutsEnabledproperty 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 中是无法通过设置 ...
随机推荐
- C#调用Python 脚本语言
1. 安装IronPython http://pan.baidu.com/s/1qW4jNJ2 下载IronPython 2.7 安装下载下来的安装包 2. 创建项目 创建一个C#的Windows窗 ...
- 第一章 Web MVC简介
Web MVC简介 1.1.Web开发中的请求-响应模型: 在Web世界里,具体步骤如下: 1. Web浏览器(如IE)发起请求,如访问hao123主页 2. Web服务器(如Tomcat)接收请 ...
- 64bit Ubuntu, Android AAPT, R.java
Ubuntu 13.10 aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object f ...
- Payment Terms 收付款条件和分期付款设置
SAP Payment Terms 中文翻译为收付款条件,他的用途是应收和应付的财务凭证中账期的管理,顾名思义即手动录入和自动生成的财务文档多少天内冲销处理则为正常,否则为超期应收应付文档,它包含的内 ...
- description 数组的中文打印
打印一个对象:NSLog(@"%@", stu); 默认情况下打印的时对象的名字和内存地址:这时需要重写description方法 // 重写description方法 - (NS ...
- 8种方法提升windows 8使用方便-----Win+x 编辑菜单
在windows 8上,你可以同时按下windows键和x键或者右键点击屏幕左下角打开一个菜单名为电源菜单或者快速访问菜单,这个菜单包含快速访问系统的工具,如控制面板,命令提示符,任务管理器,资源管理 ...
- Backbone.Events—纯净MVC框架的双向绑定基石
Backbone.Events-纯净MVC框架的双向绑定基石 为什么Backbone是纯净MVC? 在这个大前端时代,各路MV*框架如雨后春笋搬涌现出来,在infoQ上有一篇 12种JavaScrip ...
- 1509: [NOI2003]逃学的小孩 - BZOJ
Description Input 第一行是两个整数N(3 N 200000)和M,分别表示居住点总数和街道总数.以下M行,每行给出一条街道的信息.第i+1行包含整数Ui.Vi.Ti(1Ui ...
- PHP之session相关实例教程与经典代码
·php 中cookie和session的用法比较 ·phpmyadmin报错:Cannot start session without errors问题 ·php中cookie与session应用学 ...
- poj 2362
回溯加剪枝 #include <cstdio> #include <cstdlib> #include <cmath> #include <map> # ...