Validating event c

Event Args e) private void text Box2_Validating(object sender, System. Cancel Event Args e) "Bruce Wood" schreef in bericht news:11**********************@f14g2000cwb.googlegr ..

You want to set Causes Validation on that other, specific control to false. Is the setting of Causes Validation on the "other" text box in the Validating handler really necessary?

The following Cancel Event Args properties provide information specific to this event.

Handle the Validating event to test the edit value against your acceptance criteria.

This will allow that control to gain focus without firing the Validating event on the text box that the user is leaving. You can read about all the gory details of Causes Validation and validating in this thread: (watch for line wrap on the URL) The bottom line is that Causes Validation will (with a few caveats) solve your problem by preventing your Validating event handler from being called (sort of... I would have though that the lines in the Entering handlers would have been sufficient. Doesn't it work to simply set Causes Validation to "false" on both text boxes and then set it to "true" for all other controls, and not manipulate it at all in the event handlers?

validating event c-12

Hi, I have a validating event on a textbox in which I want to prevent the user to leave the textbox without entering the right data.

Only if he clicks on another specific control he is allowed to leave the textbox without entering the right information.

Is there a way to determine which other control was clicked in the validating event of the textbox?

Capture the mousedown event, then see if the click is in the location of one of the controls your allowing it to move to.

I think (but could be wrong) the mousedown will happen before your validate. Chris "Alex Bink" Hi, I have a validating event on a textbox in which I want to prevent the user to leave the textbox without entering the right data.

Leave a Reply

  1. Sims xxx dates 11-Dec-2019 21:32

    Mind you pretending to be a 25 year old boy, or a celebrity or something that you just can’t ever become is not right and it is an offence. You can talk to random people online & talk to strangers in USA, UK, Asia, Australia and all over the world, Airg chat.

  2. dating what to say 04-May-2020 10:20

    Yeah, that's right, not phone numbers, email addresses!

  3. dating a serious white man 15-Oct-2019 16:40

    Many users from all over the world use the free sex chat room to indulge in conversation of an explicit nature, share their favorite porn pics, leaked nudes and more of course to exchange nude pics of themselves.