S or /

SourceClass TableBuilder

from egui import TableBuilder
class TableBuilder:

Builder for a Table with (optional) fixed header and scrolling body.

You must pre-allocate all columns with egui.TableBuilder.column/egui.TableBuilder.columns.

If you have multiple Table:s in the same Ui you will need to give them unique id:s by with egui.TableBuilder.id_salt.

Example

Methods§

Sourcedef animate_scrolling(self, /, animated: bool) -> TableBuilder§

Should the scroll area animate scroll_to_* functions?

Default: True.

Sourcedef auto_shrink(self, /, auto_shrink: bool) -> TableBuilder§

For each axis (x,y): * If true, add blank space outside the table, keeping the table small. * If false, add blank space inside the table, expanding the table to fit the containing ui.

Default: True.

See ScrollArea.auto_shrink for more.

def auto_shrink_axes(self, /, auto_shrink: Vec2b) -> TableBuilder§
Sourcedef body(self, /) -> Any§

Create table body without a header row

Sourcedef cell_layout(self, /, layout: Layout) -> TableBuilder§

What layout should we use for the individual cells?

Sourcedef column(self, /, column: Column) -> TableBuilder§

Allocate space for one column.

Sourcedef columns(self, /, column: Column, count: int) -> TableBuilder§

Allocate space for several columns at once.

Sourcedef drag_to_scroll(self, /, drag_to_scroll: DragScroll) -> TableBuilder§

Controls scrolling the table's contents by dragging with the pointer.

Defaults to DragScroll.OnTouch — only active when a touch screen is detected.

See ScrollArea.scroll_source and DragScroll for more.

Sourcedef header(self, /, height: float) -> Any§

Create a header row which always stays visible and at the top

Sourcedef id_salt(self, /, id_salt: str) -> TableBuilder§

Give this table a unique salt within the parent Ui.

This is required if you have multiple tables in the same Ui.

Sourcedef max_scroll_height(self, /, max_scroll_height: float) -> TableBuilder§

Don't make the scroll area higher than this (add scroll-bars instead!).

In other words: add scroll-bars when this height is reached. Default: float.INFINITY.

Sourcedef min_scrolled_height(self, /, min_scrolled_height: float) -> TableBuilder§

The minimum height of a vertical scroll area which requires scroll bars.

The scroll area will only become smaller than this if the content is smaller than this (and so we don't require scroll bars).

Default: 200.0.

Sourcedef reset(self, /) -> None§

Reset all column widths.

Sourcedef resizable(self, /, resizable: bool) -> TableBuilder§

Make the columns resizable by dragging.

You can set this for individual columns with Column.resizable. egui.TableBuilder.resizable is used as a fallback for any column for which you don't call Column.resizable.

If the last column is Column.remainder, then it won't be resizable (and instead use up the remainder).

Default is False.

Sourcedef scroll_bar_visibility(self, /, scroll_bar_visibility: ScrollBarVisibility) -> TableBuilder§

Set the visibility of both horizontal and vertical scroll bars.

With ScrollBarVisibility.VisibleWhenNeeded (default), the scroll bar will be visible only when needed.

Sourcedef scroll_to_row(self, /, row: int, align: Align |None = None) -> TableBuilder§

Set a row to scroll to.

align specifies if the row should be positioned in the top, center, or bottom of the view (using Align.TOP, Align.Center or Align.BOTTOM). If align is None, the table will scroll just enough to bring the cursor into view.

See also: egui.TableBuilder.vertical_scroll_offset.

Sourcedef sense(self, /, sense: Sense) -> TableBuilder§

What should table cells sense for? (default: egui.Sense.hover()).

Sourcedef stick_to_bottom(self, /, stick: bool) -> TableBuilder§

Should the scroll handle stick to the bottom position even as the content size changes dynamically? The scroll handle remains stuck until manually changed, and will become stuck once again when repositioned to the bottom. Default: False.

Sourcedef striped(self, /, striped: bool) -> TableBuilder§

Enable striped row background for improved readability.

Default is whatever is in egui.Visuals.striped.

Sourcedef vertical_scroll_offset(self, /, offset: float) -> TableBuilder§

Set the vertical scroll offset position, in points.

See also: egui.TableBuilder.scroll_to_row.

Sourcedef vscroll(self, /, vscroll: bool) -> TableBuilder§

Enable vertical scrolling in body (default: True)