Hi, I’ve noticed some odd behaviour which might be a bug (and might be my misunderstanding!)
I have a form with a canvas in it. I can draw onto my canvas within the form_show() method of my form.
(See the form FormWithCanvas in my project below). So far, if I set FormWithCanvas as my Startup Form, I can see the canvas with drawing on it. Great!
Next, I want to repeat my initial form a number of times in another form. (See FormRepeating)
When I try to do this (and set FormRepeating as my Startup Form), my canvas(es) remain blank. I have a print statement that shows that the FormWithCanvas.form_show() is being called for each of my repeating components, but nothing appears on any canvas.
Thanks for posting this, I have raised it as a bug to be fixed. The issue comes from trying to change the canvas component with a show event on the form. If you draw the canvas upon the startup forms __init__ and the canvas’ reset event then it works.
Thanks for that, much appreciated. Also for the speedy response and workaround
I am really enjoying using Anvil for my hobby project, it’s awesome having the productivity gains from python in a webapp/database setting. It’s like MS Access for the modern age.
Cheers,
Brendon
PS: Oh, I have another bug report coming soon… in the Data Grid, showing/hiding rows and pagination interact in strange ways. Off the top of my head, I’m going to guess that the pagination uses the visible flag on the row. But I’ll start a new thread for that one.