LGUI2:table
Jump to navigation
Jump to search
A LavishGUI 2 panel element is a specialized panel where the children are automatically arranged into a grid of rows and columns.
Contents
Defining a table element
A table element is defined like a panel, with additional properties for doing table things.
Each child of a table element may use metadata to specify its row/column placement in the table. See "Child Metadata", below.
table element properties | |
---|---|
rows | An array of row definitions (see "row", below) |
columns | An array of column definitions (see "column", below) |
cellSpacing | A size definition specifying the space between rows and columns |
cellSpacingFactor | A size definition specifying the space factor (a portion of the full table size) between rows and columns |
autoFill | An autoFill definition (see "autoFill", below) |
row
row properties | |
---|---|
height | A number specifying the height of the row |
heightFactor | A number specifying the height factor (portion of the full table height) |
column
column properties | |
---|---|
width | A number specifying the width of the column |
widthFactor | A number specifying the width factor (portion of the full table width) |
autoFill
autoFill properties | |
---|---|
firstRow | An integer specifying the first row to use to auto-fill child elements into |
lastRow | An integer specifying the last row to use to auto-fill child elements into |
firstColumn | An integer specifying the first column to use to auto-fill child elements into |
lastColumn | An integer specifying the last column to use to auto-fill child elements into |
Child Metadata
Each child of a table element may use metadata to specify its row/column placement in the table.
Child Metadata properties | |
---|---|
row | An integer specifying the element's row in the table |
column | An integer specifying the element's column in the table |
rowSpan | An integer specifying the number of rows to fill with this element (if not specified, 1 row is the default) |
columnSpan | An integer specifying the number of columns to fill with this element (if not specified, 1 column is the default) |
Examples
Example 1
{ "type":"table", "name": "mytable", "width":100, "height":100, "borderThickness":1, "borderBrush":{ "color":"#cccccc" }, "rows": [ { "heightFactor":0.5 }, { "heightFactor":0.5 } ], "columns": [ { "widthFactor":0.5 }, { "widthFactor":0.5 } ], "children":[ { "type":"textblock", "text": "Cell 1,1", "_row":1, "_column":1 }, { "type":"textblock", "text": "Cell 1,2", "_row":1, "_column":2 }, { "type":"textblock", "text": "Cell 2,1", "_row":2, "_column":1 }, { "type":"textblock", "text": "Cell 2,2", "_row":2, "_column":2 } ] }
LavishGUI 2 Element Types
- Base Element Types: Element - Content Container - Headered Content Container - Item List
- Layout: anchor - border - dockpanel - dragger - expander - hud - map - page - pagecontrol -panel - popup - radialpanel - screen - scrollviewer - stackpanel - tab - tabcontrol - table - treepanel - window - wrappanel
- Display: canvas - imagebox - progressbar - radialgauge - textblock
- Interaction: button - checkbox - combobox - contextmenu - dragin - filepicker - itemview - knob - listbox - mapitemview - objectview - propertyview - scrollbar - sensitivebutton - slider - textbox
LavishGUI 2 LavishScript Object Types
- Core API (see Using LavishGUI 2 from LavishScript)
- lgui2 - lgui2animateargs - lgui2animationtype - lgui2elementref - lgui2eventargs - lgui2eventhandler - lgui2elementtype - lgui2itemviewgeneratorargs - lgui2inputbinding - lgui2layer - lgui2skin - lgui2trigger
- Enums
- elgui2animationframestate - elgui2dpad - elgui2edge - elgui2fontflags - elgui2horizontalalignment - elgui2imageorientation - elgui2progresstext - elgui2scrollbar - elgui2sizetocontent - elgui2verticalignment - elgui2visibility
- Element Components
- lgui2animation - lgui2brush - lgui2fontstyle - lgui2margins - lgui2item - lgui2property - lgui2radialitem - lgui2radialgaugeneedle
- Element Base Types
- lgui2element - lgui2bordered - lgui2contentbase - lgui2headeredcontentbase - lgui2itemlist
- Elements
- Layout: lgui2anchor - lgui2border - lgui2dockpanel - lgui2dragger - lgui2expander - lgui2hud - lgui2map - lgui2page - lgui2pagecontrol - lgui2panel - lgui2popup - lgui2radialpanel - lgui2screen - lgui2scrollviewer - lgui2stackpanel - lgui2tab - lgui2tabcontrol - lgui2table - lgui2treepanel - lgui2window - lgui2wrappanel
- Display: lgui2canvas - lgui2imagebox - lgui2progressbar - lgui2radialgauge - lgui2textblock
- Interaction: lgui2button - lgui2checkbox - lgui2combobox - lgui2contextmenu - lgui2dragin - lgui2filepicker - lgui2itemview - lgui2knob - lgui2listbox - lgui2mapitemview - lgui2objectview - lgui2propertyview - lgui2scrollbar - lgui2sensitivebutton - lgui2slider - lgui2textbox