Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / October 2008

Tip: Looking for answers? Try searching our database.

Validating ToolStripTextBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lee - 26 Sep 2008 02:37 GMT
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
Aflava - 01 Oct 2008 19:30 GMT
Have yo utried to inherit from ToolStripMenuItems  and to define your wanted
behavior?

Aflava
http://www.aflava.com

> VS2008-SP1 / C#
>
[quoted text clipped - 22 lines]
> --
> Lee Silver
Lee - 02 Oct 2008 02:48 GMT
On Oct 2, 2:30 am, "Aflava" <newsgroups{delete-th...@aflava.com>
wrote:
> Have yo utried to inherit from ToolStripMenuItems  and to define your wanted
> behavior?
[quoted text clipped - 27 lines]
> > --
> > Lee Silver

Aflava:

No, I haven't :).

I'm trying to avoid custom components, and I think I can solve the
problem using the DropDownClosed event.

Thanks for the suggestion.

--
Lee Silver

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.