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 / Languages / VB.NET / December 2005

Tip: Looking for answers? Try searching our database.

Button_Leave event problem.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
henk - 07 Dec 2005 10:46 GMT
Hi,

On my form I have one textbox and one lookup button.
If you click the lookup button you can choose eg Red, Blue, Yellow from
a datagrid.
The one you choose will be filled in the textbox.
The other possibility is to type "Yellow" in the textbox.
Both is vallid.
A third possibility is to type the beginning of, in this case, a color.
If the user now clicks on the lookup button, only the colors that match
the beginning string in the textbox will be shown.

The problem I have in this case is that:
-If the user types a color in the textbox and leave the textbox, the
color will be checked and if wrong, a message will be shown. But if the
user types eg "Yel" and leaves the textbox and clicks the
lookupbutton, I don't want to show this message.

Thanks in advance,

Henk The Netherlands.
Peter Proost - 07 Dec 2005 12:15 GMT
You could for example only do a lookup when the user hits enter and not
everytime when the textbox is validated.

Hth Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

> Hi,
>
[quoted text clipped - 17 lines]
>
> Henk The Netherlands.
Cor Ligthert [MVP] - 07 Dec 2005 16:29 GMT
Henk,

Can you rephrase it. I think that either Peter nor I understand what you
want.

By instance what do you mean with " But if the
user types eg "Yel" and leaves the textbox and clicks the
lookupbutton".  (I assume that the lookupbutton is a normal button?)

Is it something as "if the focus is on the textbox and the button is
clicked".

Maybe it seems the same however it is a big difference.

So please rephrase it a little bit and only the essential facts, by instance
if the validating is done in the validating event or in the leave event.

Cor

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.