grid uniform configuration - AlfonsMittelmeyer/python-gui-messaging GitHub Wiki

Grid Uniform Configuration

Here we would like to have some left, right, top and bottom margins

enter image description here

We could set the size of the margins individually, but it would be comfortable, if the size of the margins could be changed at once for all margins

Therefore the entry 'uniform' exists

enter image description here

We just give a grid configuration a name by an entry in uniform. Let's see, whether there was some change

enter image description here

The individual options show, that the columns can't be changed now by changing the entries for the general column configuration. These entries would now change columns with uniform 'margin'. But we still don't have such ones jet.

And indeed changing the minsize to 80 didn't have any effect

enter image description here

Also comfortable is, that the insert mode takes uniform entries into account

enter image description here

The new inserted columns have got a size of 80. The red border of the canvasses shows, that these columns have uniform values. And the color of these canvasses is the same color as the color of the entry field with 'margin'.

This should mean, that we could change the size of the margins by such an entry

enter image description here

Yes indeed

enter image description here

Maybe we should use the same margin values also for bottom and top?

After typing 'margin' here in the green uniform entry field, the row values automatically changed to the values for the columns

enter image description here

After inserting the margin for top and bottom, the canvasses show the green color of the uniform entry field for the rows

enter image description here

After erasing 'margin' from the column uniform entry field, the column values changed to the general grid column values and the canvasses for the colummns with uniform values 'margin' became green, because these columns may still be changed via the grid layout gui, by changing the entries for the rows.

enter image description here

Row or column with uniform have only the meaning, that this will be used for inserting rows or columns. But changing values applies to all rows or columns with the same uniform values.

enter image description here

Changing the minsize entry for the row to 6 affected also the columns, because this isn't now the entry for rows, but for the uniform 'margin'.

After erasing also the uniform entry for the rows whole the grid layout gui changed back to the general grid configuration

enter image description here

How to change the uniform values

Changing may be done by all means of changing individual rows or columns.

by grid bars

enter image description here

by mouse wheel or these Toplevel guis, which you get by right mouse button click on a canvas at the right or bottom side

enter image description here

Interesting is here also the button 'Abc'

enter image description here

It transfers the uniform entry to the uniform entry field for row or column in the grid layout gui

enter image description here

Just change one uniform configuration and all other rows or columns with the same uniform will change

enter image description here

Please note:

This isn't the original tkinter behaviour. In tkinter only the first defined uniform setting counts. For other row or columns with the same uniform value, their own minsize, pad and weight values don't matter.

The GuiDesigner doesn't remember the uniform master, but just changes all.