0

I have started project in which I would like to create board, program similar to Paint using Tkinter. I have created canvas and palette of colors so far (nothing special to paste). I would like to create infinite board/ canvas. By infinite I mean board/ canvas that user can move indefinitely to right, left, up or down. For example, user draw or write something on this board and instead of creating new file or adding another board to make something new, user moves the mouse to free space. Everything what have user done on this board is still on it but it's just moved to a free space which is endless. Paints canvas is not infinite, it is limited by pixels. You can zoom in or zoom out but if you want more space you have to extend canvas. Is it possible to code such an infinite board using Tkinter or there are other Python libraries that allow to code it? Is Tkinter a good choice for such a project or there are other better Python libraries to create program similar to Paint (with such a infinite board/ canvas).

Szymon Budziak
  • 81
  • 1
  • 11
  • for more "advanced" projects try qt: https://www.qt.io/qt-for-python tkinter is really limited (in my opinion) – KH241 Feb 06 '21 at 01:14
  • some helpful threads: https://stackoverflow.com/questions/25071234/how-to-resize-qtablewidget-on-widget-by-dragging-its-corner https://stackoverflow.com/questions/35508711/how-to-enable-pan-and-zoom-in-a-qgraphicsview – KH241 Feb 06 '21 at 01:22
  • there is no infinity canvas - in every GUI framework you will have to create new bigger canvas. And in every GUI you may extend canvas to add functions which will resize it when you scroll it. – furas Feb 06 '21 at 02:43
  • I see other problem - how to save it in file - `tkinter` doesn't have method to save it in PNG or JPG but it needs `pillow` and you have to draw the same on both: `canvas` and `pillow.Image`. `PyQt` / `PySide` can be better for this – furas Feb 06 '21 at 02:46
  • Infinite Canvas with tkinter is done here https://codereview.stackexchange.com/q/283227/228833 – Thingamabobs Feb 12 '23 at 11:17
  • @furas I'm not sure what you mean, since tkinter clearly offers something like this with `confine=False` and `scan_dragto`. – Thingamabobs Feb 12 '23 at 11:20

0 Answers0