|
-
Jan 27th, 2012, 01:08 PM
#1
Thread Starter
Member
Check wheter a button or textbox is clicked.
I have two text boxes (txt1, txt2) and an exit button (btnExit)
In txt1.Leave event; i have some validations. If validation fails then I keep the fous on txt1.
If btnExit is clicked then I do not want to execute the validation and instead close the application.. How do I do it?
-
Jan 27th, 2012, 01:10 PM
#2
Re: Check wheter a button or textbox is clicked.
Do not enable the button until the validation has been completed.
-
Jan 27th, 2012, 01:20 PM
#3
Thread Starter
Member
Re: Check wheter a button or textbox is clicked.
The button btnExit needs to be enabled since it's an EXIT button and can be clicked regardless of what was entered in txt1.text.
-
Jan 27th, 2012, 01:39 PM
#4
Re: Check wheter a button or textbox is clicked.
Sorry....I misunderstood you....
If your validations are in the Leave event they will fire immediately after you leave the textbox. It does not matter what you do next. The validations will fire.
What do the validations consist of?
-
Jan 27th, 2012, 01:48 PM
#5
Thread Starter
Member
Re: Check wheter a button or textbox is clicked.
txt1.text accepts numeric value (zip code); I validate the zip code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|