You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
It is not possible to create a layout that has boxes spaced apart the way they are shown in the hand-drawn image at the bottom of the https://lawsie.github.io/guizero/layout/ documentation page.
This is because the layout sticks the Box right next to the Window/App container or grid edges. A Box cannot be positioned absolutely within a container, and/or it does not have margin or padding attributes (see CSS)
Solution:
Give Box padding and/or margin attributes similar to how they work in CSS in a web browser.
An alternative is to provide absolute positioning within the container (app) with top and left attributes. Maybe adding a new layout type (besides auto and grid) that would enable absolute positioning of widgets.
Alternative:
One could use a grid with extra "empty" rows and columns that would be used to put padding space between Boxes.
The text was updated successfully, but these errors were encountered:
I need to do some invesigation into how padding works. Most widgets seem to allow padding in the config as padx, pady. You also seem to be able to provide padding data when positioning the widget using .pack and .grid e.g. .pack(padx = 10).
This thread also suggests you can pass a tuple as define different values for left, right, top, bottom.
Problem:
It is not possible to create a layout that has boxes spaced apart the way they are shown in the hand-drawn image at the bottom of the https://lawsie.github.io/guizero/layout/ documentation page.
This is because the layout sticks the Box right next to the Window/App container or grid edges. A Box cannot be positioned absolutely within a container, and/or it does not have margin or padding attributes (see CSS)
Solution:
Give Box padding and/or margin attributes similar to how they work in CSS in a web browser.
An alternative is to provide absolute positioning within the container (app) with top and left attributes. Maybe adding a new layout type (besides auto and grid) that would enable absolute positioning of widgets.
Alternative:
One could use a grid with extra "empty" rows and columns that would be used to put padding space between Boxes.
The text was updated successfully, but these errors were encountered: