Editing Many RichTextBoxes and TextBoxes

2019-08-25 07:20发布

How do i cut,copy,paste from main menu in a multi textboxes form ?

How does the menu knows to apply on the active textbox ?

2条回答
疯言疯语
2楼-- · 2019-08-25 07:24

In the menu click event you can examine this.ActiveControl to see what control currently has input focus.

查看更多
▲ chillily
3楼-- · 2019-08-25 07:45

Please see this article here on Codeproject that does the job in synchronizing each text box's "standard" edit menu such as Copy, Cut, Paste, Undo, Select All. Of course, the code originally targets the .NET 1.1, but it can be easily recompiled to target the newer frameworks as well.

查看更多
登录 后发表回答