473,385 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

undo doesnt work

im trying to use the undo function of the richTextBox but its working wrong.
when im pressing the "undo" button all the text of the richTextBox is
deleted (even if my last action was to delete only one char)
whats wrong??

For i = 0 To 9
If richTextBoxArr(i).Focused Then
If richTextBoxArr(i).CanUndo = True Then
richTextBoxArr(i).Undo()
richTextBoxArr(i).clearUndo()
Exit For
End If
End If
Next

thanks
Nov 22 '05 #1
2 1378
why are you calling undo 10 times?

--- N

"s-galit" <sg****@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
im trying to use the undo function of the richTextBox but its working wrong. when im pressing the "undo" button all the text of the richTextBox is
deleted (even if my last action was to delete only one char)
whats wrong??

For i = 0 To 9
If richTextBoxArr(i).Focused Then
If richTextBoxArr(i).CanUndo = True Then
richTextBoxArr(i).Undo()
richTextBoxArr(i).clearUndo()
Exit For
End If
End If
Next

thanks

Nov 22 '05 #2
i need to know which textBox is in focus because i have an array with some
textBox,
so first im getting to the right richTextBox and then im doing
"undo"...which is not working
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mickel Grönroos | last post by:
Hello everybody I'm developing a tool in Tkinter and would like to add Undo and Redo commands to my Edit menu. Does somebody know if anybody has implemented standard Undo/Redo as a Python...
2
by: s-galit | last post by:
im trying to use the undo function of the richTextBox but its working wrong. when im pressing the "undo" button all the text of the richTextBox is deleted (even if my last action was to delete only...
2
by: Lyn | last post by:
Hi, I have a text control on a form which is bound to table field StartDate which is in Date format. When updating the table record via the form, any data entered into the StartDate control is...
5
by: Lyn | last post by:
Hi, In the BeforeUpdate event of a textbox control I have the following simplified code:- Private Sub StartDate_BeforeUpdate(Cancel As Integer) MsgBox "StartDate Error -- Please Check and...
0
by: Wiktor Zychla | last post by:
I am still trying to get the Undo function work on Internet Explorer editor hosted as activex in my c# application. Some time ago I've found a note at msdn that says "undo is not supported". I...
5
by: Steve | last post by:
I have created my own context menu. Everything works except undo'ing deleted text. My code for these two events are: Private Sub tsmiUndo_Click(ByVal sender As Object, ByVal e As...
0
by: wizard of oz | last post by:
Hi all, I'm extending an Abstract Styled Document associated with a JTextPanel to implement a syntax highlighting editor. This is all working just fine - except for undo / redo. The problem...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.