Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualKhaiy

Posted 14 December 2012 - 10:20 PM

Your syntax looks right for subscribing to the event. When are you calling the OnClick() method from the Button class? If that method isn't being called, then the Click event isn't being raised.

I would track the mouse position and whether or not it's been clicked in the Window class, and then if the position of the cursor is inside of myButton when a click is dispatched call myButton.OnClick().

#3Khaiy

Posted 14 December 2012 - 10:20 PM

Your syntax looks right for subscribing to the event. When are you calling the OnClick() method from the Button class? If that method isn't being called, then the Click event isn't being raised.

I would track the mouse position and whether or not it's been clicked in the Window class, and then if the position of the cursor is inside of myButton when a click is dispatched call myButton.OnClick().

#2Khaiy

Posted 14 December 2012 - 10:20 PM

Your syntax looks right for subscribing to the event. When are you calling the OnClick() method from the Button class? If that method isn't being called, then the Click event isn't being raised.

I would track the mouse position and whether or not it's been clicked in the Window class, and then if the position of the cursor is inside of myButton when a click is dispatched call myButton.OnClick().

#1Khaiy

Posted 14 December 2012 - 08:34 PM

Your syntax looks right for registering the event. When are you calling the OnClick() method from the Button class? If that method isn't being called, then the Click event isn't being raised.

I would track the mouse position and whether or not it's been clicked in the Window class, and then if the position of the cursor is inside of myButton when a click is dispatched call myButton.OnClick().

PARTNERS