I have a simple main window where I placed a canvas object. I override the paint event to write a line of text and draw a line and a rectangle. I anchor the canvas to the right and bottom of the main window.
My goal is to have the rectangle, lines and text resize if I change the size of the main window. IOW, I’d like the text and line elements to get bigger or smaller depending upon how large or small the parent window gets. I added an resizing event to the main window, but I’m at a loss as to how I can then cause a repainting of the campus with font sizes and line lengths somehow proportional to the main window’s size.
The canvas itself seems to be resizing properly as I expand the parent window.
if resizing event… put “CANVAS1.INVALIDATE”
that will force the canvas to call its PAINT event
put code in the Paint Event to set textsize baseds on the Canvas Height or Width