Creating canvas button with mouseenter

XOJO Ver 2024 Release 2

Struggling understanding the process for adding mouseenter & mouseexit to use in my application.

  1. I have created the custom canvas as a subclass.
  2. I have created the event definitions (Mouse enter / mouse exit).
  3. I have drug the control onto my webpage.

This is about as far as I can get. I can’t seem to get the event to trigger. I know it must be something simple, however, it is alluding me.

I have been over the forum for the last 2 days trying to see what I am missing (Raiseevent),(Write a method).

I think my issue is the Parameters for the event, at this point I just have beat dog syndrome.

Any help would be greatly appreciated.

Thanks in advance for your consideration.

I have tried so many things I am thoughly confused now.

Are you working with Xojo Web?

I don’t think WebCanvas offers MouseEnter/MouseExit events.

You don’t need to do this. The DesktopCanvas already has these events. Just add the event handlers to the control.

Tim,

My apologies, I am using web. I have the mouseenter exit working in Desktop application. In web I created a subclass, added the 2 event definitions. Getting them to fire seems to be my issue.

Regards,

Kevin

AlbertoD,

I am using web. From what I read, I thought that is why XOJO gave us the event definition ability? Maybe I just don’t get this at all? Any clarification would surely be appreciated.

Thanks,

Kevin

When you define an event you need to handle a way for it to fire.
Just by creating MouseEnter or MouseExit events will not fire automatically when your mouse enter or exit your WebCanvas.