Table::ColumnOptions

Options for columns of Table.

Header#include "nativeui/table.h"
Namespacenamespace nu
Typestruct

Properties

Table::ColumnType type

The type of column, which decides how table cells are rendered.

By default the column renders readonly text.

std::function<void(Painter* painter, const RectF& rect, const base::Value& value)> on_draw

If the type is Custom, this function will be used for renderering table cells under the column.

int column

Which column of table model to show.

By default the index of table's newly-added column will be used.

int width

Initial width of column.

Using -1 will use auto-size. By default -1 is used.

On Linux setting the width of last column does not work, it always resizes to fill the space. It is recommended to use -1 for last column to have consistent behavior between platforms.