TableView
class in package klyn.gui.windows

    public class TableView extends Widget:

Widget
└ TableView

Spreadsheet-like table widget backed by a `TableModel`.

    import klyn.gui.windows
    import klyn.gui.windows.events

    model = TableModel("users").addColumn("id").addColumn("login")
    model.addRow(["1", "admin"])
    table = TableView(model)
    table.cellSelected += lambda(event: TableCellEvent): print(table.selectedValue)

Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | model `model as TableModel:` | Data model rendered by the view.
public property | selectedColumn `selectedColumn as Int = -1` | No summary.
public property | selectedRow `selectedRow as Int = -1` | No summary.
public readonly property | selectedValue `selectedValue as String:` | Text value of the selected cell, or an empty string when none is selected.

Inherited Properties
property Inherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, width, window, x, y
Events

Modifier and Type | Member | Description
--- | --- | ---
public event | cellSelected `cellSelected as TableCellEvent` | Emitted when the current cell changes by mouse or keyboard.

Inherited Events
event Inherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | TableView `TableView(model as TableModel = null):` | Creates a table view with an optional model.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public override | paint `paint(painter as Painter) as Void:` | No summary.
public | setSelectedValue `setSelectedValue(value as String) as Boolean:` | Updates the selected cell when the model is editable.

Inherited Methods
method Inherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds