Cameron

Cameron

  • NA
  • 1
  • 0

Validating text box when OK button is pressed

Aug 1 2009 7:12 PM
Hey All I'm just starting to look at textBox validation by creating an InputBox form which the user can enter a string into a text box and then click either OK or Cancel (which have the DialogueResult set to = OK and Cancel). There is an event that occurs when the textBox is validating in which I check if the textBox contains a string or not. Currently when I click either the OK or Cancel buttons the check is performed, however I want to only perform it when the OK button is clicked. Is there anyway of determine what caused the validating event? Or any ideas how I can only perform the check when the OK button is clicked? I could have an event occur when the button is pressed that checks the textBox, but thought I would give the textBox validating method a go. Any ideas would be greatly appreciated! Cameron

Answers (2)