views:

30

answers:

1

Hi,

I have a textbox and inside its lost focus event, I show a new window and give the user choices, I also have a button below the text box.

Now, when I change the value of the text box..and click the button (while the cursor is still inside the text box...) the lost focus event gets fired... but as I show a modal window dialog, the button's click event is not being fired....

Is there a way to get around it?

+1  A: 

Don't affect significant ui via the lost focus event. You're popping up a new window in the wrong situation- if your user ever wants to do anything interesting after entering a value in that textbox, the modal dialog will pop up because the textbox will lose focus. Instead, consider making an editable combobox where the items in the drop down are your user choices.

If you want to hack, you may be able to get away with only popping up suggestions if the textbox has no text in it on a lost focus event. I think it's a lousy solution, but it might fit your constraints.

Greg D