Editing Many RichTextBoxes and TextBoxes

断了今生、忘了曾经 提交于 2020-01-17 03:28:17

问题


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 ?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/2881259/editing-many-richtextboxes-and-textboxes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!