grid via mouse click - AlfonsMittelmeyer/python-gui-messaging GitHub Wiki
grid via mouse click
This applies for widgets, which don't have a layout
You have created some widgets and want to do a grid layout.
So you should have rows and colums, where to grid them. The existence of rows and columns isn't a problem, but the size of rows and columns is 0, if you don't determin another size. Size 0 would not allow to position widgets in grid cells by mouse click.
The GuiDesigner let you specify sizes for rows and columns. This you may do by using the grid layout user interface.
If you have this:
And enter this:
You get this:
Not a bad idea to begin. This view shows the grid cells.
Widgets, with don't have a layout, can simply positioned in a grid cell, be selecting the widget:
And then click with the mouse in a grid cell, for example, row 1 and column 0:
It's easy to do, for example:
Interesting is, that the LabelFrame is visible. Normally container widgets have only a size of one pixel, if not something else is configured or if not the grid parameter 'sticky' is set to 'nesw'.
It makes sense, that a container widget is visible. So for container widgets the GuiDesigner sets 'sticky' to 'nesw', when they are positioned via mouse click.
The GuiDesigner offers positioning via mouse click only for widgets without a layout. Otherwise easily a widget could change unintentional its place by unintentional clickings.