Click event strangeness

styxke

Member
Joined
May 18, 2006
Messages
16
Programming Experience
5-10
Hi,

I have a commonbutton class derived from the Button class with some code in the Click event handler. When the commonbutton is placed on a form and clicked it performs the buttons click event in the form and in the commonbutton class.
Now I have this problem: I have a listview on the same form and when doubleclicked
I do a commonbutton_click(sender,e) to the button on the form. The click event of the button on the form is fired, but the click event in the commonbutton class isn't ?!?

I hope this is somewhat clear ...

Any suggestions, I'm at a loss ...

Thanks !
 
What you are doing is calling an event as if it was a method. I don't think it is a good idea to action an event in this manner. Better to call 'Button.PerformClick' instead. Also this may evenr solve your problem. But without seeing some of the code you have written i couldn't be sure.
 
Back
Top