LostFocus Firing on PageLoad

  • Thread starter Thread starter Wayne Wengert
  • Start date Start date
W

Wayne Wengert

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
 
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.
 
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
 
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
 
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
 
Back
Top