By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

LostFocus Firing on PageLoad

P: n/a
I have a form that has a cbo set to TabIndex 0 (it is the only item set to
tabindex 0). On page Load if I step through the code that cbo LostFocus
event fires after other initializations are completed and after the
LostFocus event completes, that cbo gets focus and the form opens? Why is
that LostFocus event firing? Any hints on how to debug this?

Wayne
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Tue, 26 Oct 2004 17:09:24 -0600, "Wayne Wengert"
<wa***************@wengert.com> wrote:
I have a form that has a cbo set to TabIndex 0 (it is the only item set to
tabindex 0). On page Load if I step through the code that cbo LostFocus
event fires after other initializations are completed and after the
LostFocus event completes, that cbo gets focus and the form opens? Why is
that LostFocus event firing? Any hints on how to debug this?

Wayne


Did you say it was happening when you step through the code? If that's
the case, is the form not loosing focus when the VS IDE gets focus for
you to step through the code?

Hope this helps

Tom.
Nov 21 '05 #2

P: n/a
When I step through the code I see the following:

1. The PageLoad event fires and that code runs - initializes some cboBox
lists and such
2. When PageLoad exits the LostFocus event immediately fires for the cbo
with tabindex 0
3. The form opens with that cbo having focus (the GotFocus event never
fires?)

Wayne

"Tom John .decsixth.co.uk>" <tj@<removethis> wrote in message
news:79********************************@4ax.com...
On Tue, 26 Oct 2004 17:09:24 -0600, "Wayne Wengert"
<wa***************@wengert.com> wrote:
I have a form that has a cbo set to TabIndex 0 (it is the only item set totabindex 0). On page Load if I step through the code that cbo LostFocus
event fires after other initializations are completed and after the
LostFocus event completes, that cbo gets focus and the form opens? Why is
that LostFocus event firing? Any hints on how to debug this?

Wayne


Did you say it was happening when you step through the code? If that's
the case, is the form not loosing focus when the VS IDE gets focus for
you to step through the code?

Hope this helps

Tom.

Nov 21 '05 #3

P: n/a
On Wed, 27 Oct 2004 03:51:16 -0600, "Wayne Wengert"
<wa***************@wengert.com> wrote:
When I step through the code I see the following:

1. The PageLoad event fires and that code runs - initializes some cboBox
lists and such
2. When PageLoad exits the LostFocus event immediately fires for the cbo
with tabindex 0
3. The form opens with that cbo having focus (the GotFocus event never
fires?)


Can you post a code snippet that illustrates this please?

Thanks

Tom
Nov 21 '05 #4

P: n/a
Tom;

What code is needed? Basically, The Page Load Event Fires and then the Lost
Focus event for the cbo with tabindex = 0 fires. There is not really any
"code" involved. I tried it with minimal code in page load (initialize a
textbox) and lost focus (change background color).

Wayne

"Tom John .decsixth.co.uk>" <tj@<removethis> wrote in message
news:rp********************************@4ax.com...
On Wed, 27 Oct 2004 03:51:16 -0600, "Wayne Wengert"
<wa***************@wengert.com> wrote:
When I step through the code I see the following:

1. The PageLoad event fires and that code runs - initializes some cboBox
lists and such
2. When PageLoad exits the LostFocus event immediately fires for the cbo
with tabindex 0
3. The form opens with that cbo having focus (the GotFocus event never
fires?)


Can you post a code snippet that illustrates this please?

Thanks

Tom

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.