Clarify grid autobreak behavior

This commit is contained in:
2026-07-07 23:06:53 +01:00
parent 44403bea2b
commit 5bd819d812
5 changed files with 52 additions and 17 deletions

View File

@@ -43,9 +43,11 @@ with dpg.window(label="Engine"):
dpgg.status_light(tag="ecu", label="ECU", state=True)
```
`gauge_grid` is a wrapping, table-backed layout. `columns` is a maximum; if the parent is too
narrow for `columns * min_column_width`, the grid uses fewer columns and continues on the next row
instead of creating a horizontal scrollbar. Gauges with `width=0` or `width=-1` fill their grid cell.
`gauge_grid` is a wrapping, table-backed layout. An integer `columns` value is a maximum; if the
parent is too narrow for `columns * min_column_width`, the grid uses fewer columns and continues on
the next row instead of creating a horizontal scrollbar. Use `columns="auto"` for autobreak mode,
where the grid derives the column count from the available width. Gauges with `width=0` or
`width=-1` fill their grid cell.
Gauges also accept Dear PyGui's usual `parent` argument for adding a gauge to an
existing container after that container has already been created: