This may be something of a noob question, but I’ve never really needed to figure this out, and so far my reading both on this forum and in the manual is not giving the direction I need.
I have created a subclass of canvas we’ll call CustomCanvas. In general, there are some things that I want to have happen in, say, the MouseEnter event of ALL CustomCanvas instances. So I implement the MouseEnter event in CustomCanvas.
Then I add an instance of CustomCanvas to a window, and discover that for this specific instance of CustomCanvas, I need it to do a few more things when MouseEnter fires. But I don’t want all CustomCanvases to behave this way, just this specific instance.
However, I cannot add an event handler to this instance, because it is already in the class.
So, to sum up: How can I add some custom behavior to an instance of a canvas subclass that augments an event that is implemented in the subclass?
I’d prefer to do this without creating yet another subclass of my subclass.
I suspect there will be some event definitions in here somewhere, but I’m fuzzy on exactly how those work and if they would apply here.