| | |
undo/redo help!!!
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2005
Posts: 4
Reputation:
Solved Threads: 0
hey guys...
i need help on making an undo/redo command in my menu...
can ya help!
o yeah! plz put this stuff n the simplist terms that you can think of like (insert this code here and this there)
i just got vb standard 2003 3 days ago, and have no programming experience (except for HTML), therefore i am a NOOB!!! :p
thx!
Pat
i need help on making an undo/redo command in my menu...
can ya help!
o yeah! plz put this stuff n the simplist terms that you can think of like (insert this code here and this there)
i just got vb standard 2003 3 days ago, and have no programming experience (except for HTML), therefore i am a NOOB!!! :p
thx!
Pat
In the click events of your menu items you just need to call the undo/redo methods of the RichTextBox or TextBox you have on your form....You can also check to see if it's possible to undo or redo in the popup event of your menuitem's parent
For example, if I had a menuitem called miEdit with two child menuitems called miEditUndo and miEditRedo and a RichTextBox called rtbText I'd so this:
The popup event for miEdit:
Then for the click even of the Undo button:
Then for the click event of the Redo MenuItem
That's how you do it
For example, if I had a menuitem called miEdit with two child menuitems called miEditUndo and miEditRedo and a RichTextBox called rtbText I'd so this:
The popup event for miEdit:
ASP.NET Syntax (Toggle Plain Text)
public void miEdit_Popup(object sender, System.EventArgs e) { if(rtbText.CanUndo) miEditUndo.Enabled = true; else miEditUndo.Enabled = false; if(rtbText.CanRedo) miEditRedo.Enabled = true; else miEditRedo.Enabled = false; }
Then for the click even of the Undo button:
ASP.NET Syntax (Toggle Plain Text)
public void miEditUndo_Click(object sender, System.EventArgs e) { rtbText.Undo(); }
Then for the click event of the Redo MenuItem
ASP.NET Syntax (Toggle Plain Text)
public void miEditRedo_Click(object sender, System.EventArgs e) { rtbText.Redo(); }
That's how you do it
![]() |
Similar Threads
- tkinter undo/redo (Python)
- undo - redo function in a text editor (Java)
- how to bind keys to menu items? (Python)
- Undo (Java)
Other Threads in the ASP.NET Forum
- Previous Thread: instrumenting an application in .NET
- Next Thread: SONET architecture as it relates to Voice over IP
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net bc30451 beginner bottomasp.net box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol fileuploader findcontrol flash flv forms gridview gudi homeedition iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings redirect registration relationaldatabases rotatepage save search security serializesmo.table sessionvariables silverlight smartcard sql ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml





