A Grid with a row of column headers. Clicking a sortable header fires OnSortColumn, dragging the right border of a resizable header fires OnResizeColumn. The rows are never reordered by the table itself.
Inherits from: Widget
Lua full name: lysa.ui.Table
|
| integer | add_column (title: string) |
| | Appends a sortable and resizable column sharing the remaining space and returns its index. More...
|
| |
| integer | add_column (title: string, width: number) |
| | Appends a column of the given width and returns its index. More...
|
| |
| integer | add_column (title: string, width: number, sortable: boolean, resizable: boolean) |
| | Appends a column and returns its index. More...
|
| |
| nil | remove_column (index: integer) |
| | Removes a column, its header and the cells it displays. More...
|
| |
| nil | remove_all_columns () |
| | Removes all the columns, their headers and all the cells. More...
|
| |
| Button|nil | get_column_header (index: integer) |
| | Returns the clickable header of a column, or nil for an invalid index. More...
|
| |
| Widget|nil | get_column_title (index: integer) |
| | Returns the widget displayed by the header of a column, or nil. More...
|
| |
| integer | get_column_at (x: number) |
| | Returns the index of the column displayed at a position, or NO_COLUMN. More...
|
| |
| nil | set_column_width (index: integer, width: number) |
| | Sets the width of a column, zero to share the remaining space. More...
|
| |
| number | get_column_width (index: integer) |
| | Returns the width currently used by a column. More...
|
| |
| nil | set_column_sortable (index: integer, sortable: boolean) |
| | Sets whether clicking the header of a column sorts the table. More...
|
| |
| boolean | is_column_sortable (index: integer) |
| | Returns true if clicking the header of a column sorts the table. More...
|
| |
| nil | set_column_resizable (index: integer, resizable: boolean) |
| | Sets whether the width of a column can be changed with the mouse. More...
|
| |
| boolean | is_column_resizable (index: integer) |
| | Returns true if the width of a column can be changed with the mouse. More...
|
| |
| integer | add_row () |
| | Appends a row of the default height and returns its index. More...
|
| |
| integer | add_row (height: number) |
| | Appends a row of the given height and returns its index. More...
|
| |
| nil | insert_row (index: integer) |
| | Inserts a row of the default height, the rows below being shifted down. More...
|
| |
| nil | insert_row (index: integer, height: number) |
| | Inserts a row of the given height, the rows below being shifted down. More...
|
| |
| nil | remove_row (index: integer) |
| | Removes a row and the cells it displays. More...
|
| |
| nil | remove_all_rows () |
| | Removes all the rows and the cells they display, the columns are kept. More...
|
| |
| nil | set_row_height (index: integer, height: number) |
| | Sets the height of a row, zero to share the remaining space. More...
|
| |
| number | get_row_height (index: integer) |
| | Returns the height requested for a row. More...
|
| |
| GridCell|nil | get_cell (row: integer, column: integer) |
| | Returns the cell at a position of the table, or nil. More...
|
| |
| nil | sort (column: integer, order: SortOrder) |
| | Changes the sorted column and the sort direction, then fires OnSortColumn without reordering the rows. More...
|
| |
| nil | set_resources (res_header: string, res_grid: string, res_arrow: string) |
| | Reloads the visual style: res_header = headers, res_grid = grid, res_arrow = sort indicators. More...
|
| |
|
| integer | NO_COLUMN |
| | Sentinel value used when no column is sorted or found.
|
| |
| integer | column_count |
| | The number of columns. (read-only)
|
| |
| integer | row_count |
| | The number of rows. (read-only)
|
| |
| integer | sorted_column |
| | The index of the sorted column, or NO_COLUMN. (read-only)
|
| |
| integer | sort_order |
| | The direction of the sort of the sorted column (see lysa.ui.SortOrder). (read-only)
|
| |
| number | grip_width |
| | The width of the area used to drag the border between two columns.
|
| |
| number | default_row_height |
| | The height given to the rows added without an explicit height.
|
| |
| Grid | grid |
| | The grid displaying the content of the table. (read-only)
|
| |