CanvasDragRect example project

I am confused by a couple things in the CanvasDragRect example that comes with Xojo.

  1. DragCanvas is the name of the canvas that exists in the MainWindow of the project. It appears to be a basic canvas (not a subclass). There are a number of event handlers. MouseDown, MouseDrag etc. these have associates code. They have the icon that I associate with event handlers. But I am expecting them to be in the subcategory EventHandlers. They are not. They are at the highest level under DragCanvas.

  2. One of the event handlers is Paint. It has two parameters. (g As Graphics, areas() As REALbasic Rect).

Let’s say I wanted to change the name areas to something else. I see no way of accessing the parameters to do that. I can access the code inside that event but not the parameter listing.


the parameters you want to change are default Canvas parameters and cannot be changed (unles you sublass the Canvas ? Add a New Event in the SubClass, ???)

Thanks Emile. I was trying to get rid of the realBASIC Rect and replace it with Xojo.Core.Rect but your reply makes clear that this is not anything that is possible currently.

Now it all seems like a stupid question so I am glad I posted in Getting Started