You’ll have to pardon me because I’m just getting back into Xojo after being away many years. I popped open a VERY old (like early 2000s REALBasic old – don’t judge me!) project to begin updating it. Most of it has been pretty straightforward but I’m a little confused about switching from using Canvas for redrawing things to now using Paint.
This is basically a spreadsheet app. The app’s main window’s Paint event only calls a “RedrawGrid” method. This RedrawGrid method consists of a bunch of smaller methods for drawing each element separately: lines, text in each cell, row / column headings, etc. When I compile my old code I get alerts that my old code (Spreadsheet.graphics.ForeColor, .FillRect, .TextFont, etc.) has been deprecated and I should be using Paint instead of canvas.graphics.
What’s the most straightforward way of updating my code? I don’t have to actually move any of this code into the Window’s Paint event, do I? Do I add Paint subroutines to my old methods, or pass some parameter to them, or what?
I know the answer is going to be spectacularly easy, but like I said I’ve been away a while and I just keep getting stuck. Searching for some before and after RB code examples hasn’t turned much up either. Any help is greatly appreciated.