如何使用Redo选项创建记事本应用程序 [英] How to create a notepad application with Redo option

查看:91
本文介绍了如何使用Redo选项创建记事本应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

Hello All,

我正在使用此应用程序中的Redo选项创建一个记事本应用程序我在VS 2010中使用C#中的文本框。我有尝试了这么多代码,但没有人工作,请帮我做重做操作。

I am working to create a notepad application with Redo option in this application I am using a text box in VS 2010 in C#  .I have tried so many codes but no one is working please help me to do redo operation.

mallika.shaik

mallika.shaik

推荐答案

增强型文本框已经支持这些操作。在表单中添加
RichTextBox 控件,设置基本参数,例如 Multiline = True
ScrollBars = Both 。添加撤消和重做操作的按钮或菜单项以及相应的处理程序。代码是:
richTextBox1.Undo() richTextBox1.Redo()

These operations are already supported by the enhanced textbox. Add a RichTextBox control to your form, set basic parameters such as Multiline=True, ScrollBars=Both. Add buttons or menu items for Undo and Redo operation, and the corresponding handlers. The code is: richTextBox1.Undo() and richTextBox1.Redo().

< span lang ="EN-US">简单的文本框和记事本应用程序似乎只支持单级撤销和重做操作。

或显示您尝试过的许多代码。


这篇关于如何使用Redo选项创建记事本应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆