Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - leave event fires disabling textbox below -cursor stays in 1st tex

Reply
 
Old 01-21-2009   #1 (permalink)
nlarson11


 
 

leave event fires disabling textbox below -cursor stays in 1st tex

Hello,

I have a situation where the cursor is sitting in textbox 1. The user hits
the tab key and in the leave event of textbox 1 it checks the text property
seeing if it matches a specific value. If so, it disables textbox 2 directly
below it. So by the user hitting the tab key and this occuring, the cursor
should be in textbox 3. Because at the time of hitting the tab key, textbox
2 was enabled .net just realized that it can't put focus in textbox 2 so it
cancels the keypress event and leaves the cursor in textbox 2 instead of
placing it in textbox 3.

This is extremely easy to reproduce and there is a couple of work arounds.
Is this problem known and will it be fixed anytime soon?

Thank you...Nathan - GBIS

My System SpecsSystem Spec
Old 01-21-2009   #2 (permalink)
rhaazy


 
 

Re: leave event fires disabling textbox below -cursor stays in 1sttex

On Jan 21, 3:46*pm, nlarson11 <nlarso...@xxxxxx>
wrote:
Quote:

> Hello,
>
> I have a situation where the cursor is sitting in textbox 1. * The userhits
> the tab key and in the leave event of textbox 1 it checks the text property
> seeing if it matches a specific value. *If so, it disables textbox 2 directly
> below it. * So by the user hitting the tab key and this occuring, the cursor
> should be in textbox 3. * Because at the time of hitting the tab key, textbox
> 2 was enabled .net just realized that it can't put focus in textbox 2 so it
> cancels the keypress event and leaves the cursor in textbox 2 instead of
> placing it in textbox 3.
>
> This is extremely easy to reproduce and there is a couple of work arounds.. *
> Is this problem known and will it be fixed anytime soon? *
>
> Thank you...Nathan - GBIS
so on your leave event for textbox1, if the text matches a particular
value, disable textbox2 and set focus for textbox3.
private void textBox1_Leave(object sender, EventArgs e)
{
if (textBox1.Text == "testCase")
{
textBox2.Enabled = false;
textBox3.Focus();

}
}
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Windows Defender: Event 3004 never fires Vista security
key press event of textbox in asp.net without javascript .NET General
Vista MSTSC.EXE text select cursor dissapears on event Vista General
Vista MSTSC.EXE text select cursor dissapears on event Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46