Re: Validating ToolStripTextBox



Have yo utried to inherit from ToolStripMenuItems and to define your wanted
behavior?


Aflava
http://www.aflava.com


"Lee" <lsilver@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:d69d1d98-7448-47c3-8d7b-be86d841ebdf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
VS2008-SP1 / C#

Given the following menu-structure:

MenuItem1
MenuItem2
MenuItem3 -> TextBox1

where the MenuItems are ToolStripMenuItems and TextBox1 is a
ToolStripTextBox.

I'm trying to validate user-entered data in TextBox1. Unfortunately
the Leave event does not fire.

What I've done is to do the validations in the DropDownClosed event of
MenuItem3. This works but to me it is sloppy because TextBox1 is not
visible at this point and I can find no way to make it visible in the
event of an error. (I report errors in a status bar, so all is not
lost.)

I'm hoping that there's a way that I haven't discovered to do the
validations while TextBox1 is still visible and without testing
individual key-strokes.

--
Lee Silver


.



Relevant Pages

  • Validating ToolStripTextBox
    ... where the MenuItems are ToolStripMenuItems and TextBox1 is a ... I'm trying to validate user-entered data in TextBox1. ... validations while TextBox1 is still visible and without testing ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • RE: Validating ToolStripTextBox
    ... I'm trying to validate user-entered data in TextBox1. ... validations while TextBox1 is still visible and without testing ... If the above is not possible, is there a way that MenuItem3 can be ... ToolStripTextBox doesn't inherit from Control. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Validating ToolStripTextBox
    ... I'm trying to validate user-entered data in TextBox1. ... (I report errors in a status bar, ... validations while TextBox1 is still visible and without testing ... If the above is not possible, is there a way that MenuItem3 can be ...
    (microsoft.public.dotnet.framework.windowsforms)

Loading