class _ColumnGaps:
Serve _Gap's for complete columns
Grid.colgaps property.| Method | __init__ |
Example |
| Instance Variable | grid |
Grid object |
| Method | has_column |
Does column gap exist at index n ? |
| Method | set |
Set a list of column_gaps to private property _list_orig |
| Method | get |
Get accessor for _list |
| Method | measure |
Create property _list. |
| Method | count |
Return the number of column gaps |
| Method | add_to_cells |
Add _Cell objects with _Gap objects with corresponding coordinates to Grid.cells |
| Instance Variable | _list_orig |
Original list of tuples defining the column gaps, as set with set method |
| Instance Variable | _list |
Copy of the _list_orig variable with altered indices depending on Grid.expand_left |
Example
grid.colgaps = _ColumnGaps( grid )
| Parameters | grid | required Grid object |
Copy of the _list_orig variable with altered indices depending on Grid.expand_left
Its indices are altered depending on the expanding far left column.
The values are calculated in measure.
list)
Does column gap exist at index n ?
if grid.colgaps.has_column( 2 ) : pass
| Parameters | n | int, default -1 |
| Returns | bool (type: bool) | |
Set a list of column_gaps to private property _list_orig
grid.colgaps.set([
(0, None), # 1. column gap
(1, 0), # 2. "
(2, 20), # 3. "
(3, "expand") # 4. "
])
grid.colgaps.set()measure.Grid.get_content_columns| Parameters | column_gaps | list of tuples, default [ ] |
Create property _list.
Grid.expand_left is true, the _list_orig is copied to _list, but with incremented x-indices.Grid.expand_left is false, the _list_orig is simply copied to _list.Add _Cell objects with _Gap objects with corresponding coordinates to Grid.cells
_Gap object with its coordinates,_Cell object and aggregate it to Grid.cells.