StuartK
asked on
ComboBox1 Undo method???
Hi,
thanks for clicking,
Converted over from Access 2000 to vb.net
In Access had a method that could undo anything typed into the ComboBox with Combo.Undo
Know there is a Undo method for a textbox in vb.net
Is there one for ComboBox, or does anybody know a good work around??
Thanks
Stuart
thanks for clicking,
Converted over from Access 2000 to vb.net
In Access had a method that could undo anything typed into the ComboBox with Combo.Undo
Know there is a Undo method for a textbox in vb.net
Is there one for ComboBox, or does anybody know a good work around??
Thanks
Stuart
AFAIK the ComboBox does not have an Undo method. You can code this by keeping track of changes in to the combo box: adding deleted values, deleting added values, etc.
ASKER
Hi TheLearnOne,
What do you mean by "adding deleted values, deleting added values, etc."
I've tried to stick the changed text into an array within the KeyDown event by using
ComboText(i) = Combo1.Text
i =i +1
And then use ComboText(0) to access original text in Combo1. And reset i to 0.
Is this the essence of what your getting at??
Stuart
What do you mean by "adding deleted values, deleting added values, etc."
I've tried to stick the changed text into an array within the KeyDown event by using
ComboText(i) = Combo1.Text
i =i +1
And then use ComboText(0) to access original text in Combo1. And reset i to 0.
Is this the essence of what your getting at??
Stuart
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi TheLearnedOne,
Sorry for late reply. Got distracted, and only noticed still open when I returned to EE
First of all I'm very priveleged to have you answer my question, especially when I'm a small time programmer just starting out, who can only afford 50 points per question, otherwise I run out of points. No.6, soon to be No.4 in this years list and you take time to answer my question. Thank you.
The last email did go above my head a little bit. Just to feed back the way I got around it. I set a Global variable and set it to Combo.Text property in the Combo_Enter event. Then if Item was NotInList (using code that checks .Text against each value in list) within Validating event, it then reverted to the Global string.
Hope I haven't bored you, but I feel it's bad manners to simply ignore and not have the courtesy to let them know how it was resolved.
Thanks you again, Stuart
Sorry for late reply. Got distracted, and only noticed still open when I returned to EE
First of all I'm very priveleged to have you answer my question, especially when I'm a small time programmer just starting out, who can only afford 50 points per question, otherwise I run out of points. No.6, soon to be No.4 in this years list and you take time to answer my question. Thank you.
The last email did go above my head a little bit. Just to feed back the way I got around it. I set a Global variable and set it to Combo.Text property in the Combo_Enter event. Then if Item was NotInList (using code that checks .Text against each value in list) within Validating event, it then reverted to the Global string.
Hope I haven't bored you, but I feel it's bad manners to simply ignore and not have the courtesy to let them know how it was resolved.
Thanks you again, Stuart