LostFocus Firing on PageLoad

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
 
T

Tom John

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.
 
W

Wayne Wengert

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
 
T

Tom John

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
 
W

Wayne Wengert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top