winfrom 中Editor 控件问题

jiangjun110120 2010-10-16 05:35:05
请问winfrom 中Editor 控件按Enter键不换行怎么实现
...全文
85 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hch126163 2010-11-26
  • 打赏
  • 举报
回复
KeyPress 事件 处理一下
1、 设置 Enter键 无效
2、替换 Enter键 生成的 P 标签 或者是 br 标签
wuyq11 2010-10-16
  • 打赏
  • 举报
回复
什么Editor 控件
foreach (Control c in this.Controls)
{
c.KeyPress += new System.Windows.Forms.KeyPressEventHandler(test);
}
private void test(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{}
}

111,129

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧