Re-draw CanvasGrid

25 views
Skip to first unread message

Blaine Haws

unread,
Jun 29, 2019, 1:12:19 AM6/29/19
to ProjectMesa
I have a need to redraw the CanvasGrid height and width based upon a user's choice from a UserSettableParameter. 

Eg:

If user selects Map Size = Large, the grid should be 50,50
Map Size = Medium, grid is 25,25
Small, grid is 10,10

or something.

Any thought/input would be SUPER helpful!

Blaine Haws

unread,
Jun 29, 2019, 1:16:40 AM6/29/19
to ProjectMesa

Konstantinos Bazakos

unread,
Mar 12, 2021, 6:17:21 AMMar 12
to ProjectMesa
Hi!
Thanks for sharing your code!
Actually, I tried to run it with PyCharm but without success...

I also tried to implement your code on my project (the lines that affect visualization, grid size parameters etc) but no luck :(

You managed to resize dynamically the grid size after model's reset?

Thanks!
Reply all
Reply to author
Forward
0 new messages