Controls such as the TextBox fire Validating and Validated events as part of the validation mechanism that is provided by WinForms. This allows you to prevent the focus leaving a control if there is an error in that data entry field. Unfortunately the majority of the Krypton Toolkit controls do not fire these events directly.

Most Toolkit controls such as the KryptonTextBox are actually made up of two parts. The KryptonTextBox itself is a container that has a single child control which is justĀ a standard TextBox. This is done so that the container can draw the border around the inner control and then the inner control can be instructed to draw without a border. An approach required so that the correct border is drawn according to the Krypton Palette definition. It does however have the complication that many of the events of interest are fired by the inner control. To get around this the container hooks the events of the inner controlĀ and then fires them again from itself. So as a developer you just hook the container and it fires the events you expect, without most developers realising that the event actually originated from the inner control.

Turns out that I missed a couple of events. So I have now updated the source code so that the Validating and Validated events from inner controls are now fired from the container. This makes it much easier to get the validation mechanism to work. The controls affected by this are…

  • KryptonListBox
  • KryptonCheckedListBox
  • KryptonTextBox
  • KryptonMaskedTextBox
  • KryptonRichTextBox
  • KryptonNumericUpDown
  • KryptonDomainUpDown
  • KryptonComboBox

6 Responses to “Validating and Validated”

  1. vulkanino Says:

    Apparently my pain with the non-working ValidateChildren call was heard :)

  2. dg78 Says:

    If all the complaints about a great datagridview and the ribbon (as CocotteSeb said, long time ago) could also be heard, it would be wonderful.

  3. Hitesh Says:

    you are so lost since long; hope u r somewhere around in planet earth :-)

  4. Gary Says:

    By the lack of updates i’m guessing this component suite is no longer in production… will now need to find an alternative…. shame!

  5. Cocotteseb Says:

    Some plans have been specified here :

    Keep hope…

    Well moving to another solution takes time. But more important some great controls/functionalities do not exist in other libraries (ie workspace) and the price (not everybody can afford a 1000$ suite)…. :/

  6. Tom Says:


    It looks like the plans wil always be plans if you watch that thread….

Leave a Reply