Skip to content

Search

Documentation

widget_table

The rows a table reads: its columns and how they sort. The widget_table component of the Balaur game engine: its 8 properties, and the functions a script…

On this page

ui · 8 properties · UI

The rows a table reads: its columns and how they sort.

In a scene, widget_table is the node key that applies it. A script reaches each property below as a field on node.widget_table: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.widget_table.get() and node.widget_table.set(table).

Properties

property type default description
header bool true Draw the strip that names a table's columns. Off, its columns are still titles', and a table that names none keeps its first row as a row
reverse bool false Take a table's rows the other way round: the sort descending, or the order they were given bottom to top where none is named
sort string — The column the rows are ordered by, by the name in titles; empty leaves them in the order they were given. A cell that starts with a number sorts as one, so 12 KB follows 3 KB. reverse takes them the other way round
sortable bool false Let a click on the header sort by that column, and the next click on the same one turn it round; the column sorted by carries a caret
splitter_width float 0 How wide a grab the seam between two of a table's columns gets, in design pixels; 0 takes six At least 0.
text_align enum start Where every cell of a table sits in its column; a column whose name ends in > pins its own to the right One of start, center, end.
titles list [] A table's column names, in order, and with them how many columns it has: a name ending in > draws its column against the right edge, which is what a column of numbers wants. None takes the first row as the names
widths list [] Each column's share of the width, in the order titles names them: ["2", "1", "1"] gives the first half and the other two a quarter each. Numbers and the text of them both; empty divides the width evenly, and a drag on a seam in the header writes the shares back

Are you sure?