tags:

views:

15

answers:

1

Hi,

i have a dialog box with 2 text inputs.Dialog has 2 buttons ok/cancel

What i want is when open the dialog and input 1 has a value of "pets" and change it to "animals" when click ok holds the new value (animals) but when click the cancel return to old value (pets).

Any help appreciated

A: 

Your question is a little confusing about exactly how you want it to work so there might be better ways of doing this but you could just handle the Load event of the form and in there you store whatever is in input1 to a member variable and if the user clicks Cancel you overwrite the text in input1 with whatever is stored in the variable.

ho1