Jump to content
bazzer747

Button needs two clicks

Recommended Posts

Hi,

I have a button on a form that I initially have disabled, as I don't want it clickable until a couple of comboboxes on the form have values selected.

 

When the two comboboxes have been selected I enable the button. However, a first click on the button does nothing. A second click actions the code behind the OnClick event - which is to open up another form.

 

I have a breakpoint on the OnClick event but nothing happens on the first click. On the second click the breakpoint kicks in and takes me to the OnClick event. It's as though the first click never happened.

 

Any thoughts on why this should be would be appreciated.

Share this post


Link to post

Try to write a very simple program to reproduce the error. For example a single form with two comboboxes and a button. Implement the logic you exposed in your question and in the button OnClick, just call ShowMessage. If it doesn't work, publish the code here. If it works, then double check you application to find whicg error you made.

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×