Search code examples
pythonwxpythonsizer

How to make a dynamic number of horizontal BoxSizers?


I have a function that calculates the number of images that can be displayed on the screen, if there are more images than the ones that can be put on screen, I resize the images till they all can appear.

Then, I want to display them with one vertical box sizer and several horizontal box sizers!

The horizontal number of box sizers are dynamic, it can be only one or more depending on the number of images.

How can I define several box sizers and add them to the vertical box sizer?


Solution

  • wx.GridSizer is the answer!