Difference between revisions of "Grid"

From Lianjapedia
Jump to: navigation, search
Line 11: Line 11:
 
!width="50%"|Description
 
!width="50%"|Description
 
|-
 
|-
|RowCount
+
|ActiveColumn
 
|RW
 
|RW
 
|Numeric
 
|Numeric
|Number of rows
+
|Currently selected column
|-
+
|RowHeight
+
|RW
+
|Numeric
+
|Row height in pixels
+
 
|-
 
|-
 
|ActiveRow
 
|ActiveRow
Line 26: Line 21:
 
|Currently selected row
 
|Currently selected row
 
|-
 
|-
|ActiveColumn
+
|valign="top"|AlternatingRowColors
|RW
+
|valign="top"|RW
|Numeric
+
|valign="top"|Boolean
|Currently selected column
+
|valign="top"|Whether rows have alternating background colors
 
|-
 
|-
 
|ColumnCount
 
|ColumnCount
Line 35: Line 30:
 
|Numeric
 
|Numeric
 
|Number of columns
 
|Number of columns
 +
|-
 +
|GridLineColor
 +
|RW
 +
|Numeric
 +
|Color of grid lines
 
|-
 
|-
 
|GridLines
 
|GridLines
Line 41: Line 41:
 
|Whether grid lines are displayed
 
|Whether grid lines are displayed
 
|-
 
|-
|valign="top"|AlternatingRowColors
+
|HeaderHeight
|valign="top"|RW
+
|RW
|valign="top"|Boolean
+
|Numeric
|valign="top"|Whether rows have alternating background colors
+
|Column header height in pixels
 +
|-
 +
|Picture
 +
|RW
 +
|Character
 +
|Filename of background image
 
|-
 
|-
 
|Readonly
 
|Readonly
Line 51: Line 56:
 
|Whether grid is readonly
 
|Whether grid is readonly
 
|-
 
|-
|WordWrap
+
|Recno
|RW
+
|R
|Boolean
+
|Numeric
|Whether text is word-wrapped
+
|Current record number
 
|-
 
|-
|valign="top"|Scrollbars
+
|valign="top"|RecordMark
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Numeric
 
|valign="top"|Numeric
|valign="top"|Scrollbars displayed: 0 = none, 1 = horizontal, 2 = vertical
+
|valign="top"|Whether record number column is displayed: 0 (False), 1 (True)
 
|-
 
|-
|valign="top"|RelativeRow
+
|valign="top"|RecordSource
|valign="top"|R
+
|valign="top"|RW
 +
|valign="top"|Character
 +
|valign="top"|Source of data to which the grid is bound
 +
|-
 +
|valign="top"|RecordSourceType
 +
|valign="top"|RW
 
|valign="top"|Numeric
 
|valign="top"|Numeric
|valign="top"|Currently selected row relative to the grid display
+
|valign="top"|Data source type: 0 = table, 1 = alias, 4 = SQL statement
 
|-
 
|-
 
|valign="top"|RelativeColumn
 
|valign="top"|RelativeColumn
Line 71: Line 81:
 
|valign="top"|Currently selected column relative to the grid display
 
|valign="top"|Currently selected column relative to the grid display
 
|-
 
|-
|HeaderHeight
+
|valign="top"|RelativeRow
 +
|valign="top"|R
 +
|valign="top"|Numeric
 +
|valign="top"|Currently selected row relative to the grid display
 +
|-
 +
|valign="top"|RowColChange
 +
|valign="top"|RW
 +
|valign="top"|Numeric
 +
|valign="top"|Type of cell movement made: 0 = no change, 1 = row change, 2 = column change, 3 = row and column change
 +
|-
 +
|RowCount
 
|RW
 
|RW
 
|Numeric
 
|Numeric
|Column header height in pixels
+
|Number of rows
 
|-
 
|-
|GridLineColor
+
|RowHeight
 
|RW
 
|RW
 
|Numeric
 
|Numeric
|Color of grid lines
+
|Row height in pixels
 
|-
 
|-
|valign="top"|RecordSource
+
|Rowid
|valign="top"|RW
+
|R
|valign="top"|Character
+
|Numeric
|valign="top"|Source of data to which the grid is bound
+
|Current record number
|-
+
|valign="top"|RecordSourceType
+
|valign="top"|RW
+
|valign="top"|Numeric
+
|valign="top"|Data source type: 0 = table, 1 = alias, 4 = SQL statement
+
 
|-
 
|-
 
|valign="top"|RowSource
 
|valign="top"|RowSource
Line 101: Line 116:
 
|valign="top"|Data source type: 0 = table, 1 = alias, 4 = SQL statement
 
|valign="top"|Data source type: 0 = table, 1 = alias, 4 = SQL statement
 
|-
 
|-
|valign="top"|RecordMark
+
|valign="top"|Scrollbars
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Numeric
 
|valign="top"|Numeric
|valign="top"|Whether record number column is displayed: 0 (False), 1 (True)
+
|valign="top"|Scrollbars displayed: 0 = none, 1 = horizontal, 2 = vertical
|-
+
|valign="top"|RowColChange
+
|valign="top"|RW
+
|valign="top"|Numeric
+
|valign="top"|Type of cell movement made: 0 = no change, 1 = row change, 2 = column change, 3 = row and column change
+
 
|-
 
|-
 
|valign="top"|ViewMode
 
|valign="top"|ViewMode
Line 116: Line 126:
 
|valign="top"|View mode for split grids: 0 = grid view, 1 = form view, 2 = split view
 
|valign="top"|View mode for split grids: 0 = grid view, 1 = form view, 2 = split view
 
|-
 
|-
|Picture
+
|WordWrap
 
|RW
 
|RW
|Character
+
|Boolean
|Filename of background image
+
|Whether text is word-wrapped
|-
+
|Recno
+
|R
+
|Numeric
+
|Current record number
+
|-
+
|Rowid
+
|R
+
|Numeric
+
|Current record number
+
 
|-
 
|-
 
|}
 
|}
Line 141: Line 141:
 
!Args
 
!Args
 
!width="50%"|Description
 
!width="50%"|Description
 +
|-
 +
|valign="top"|ActivateCell
 +
|valign="top"|row as Numeric, column as Numeric
 +
|valign="top"|Select the cell at the specified row and column position
 
|-
 
|-
 
|valign="top"|AddColumn
 
|valign="top"|AddColumn
Line 146: Line 150:
 
|valign="top"|Add a column at the specified column position
 
|valign="top"|Add a column at the specified column position
 
|-
 
|-
|valign="top"|RemoveColumn
+
|valign="top"|AddItem
|valign="top"|column as Numeric
+
|valign="top"|data as Character
|valign="top"|Remove a column at the specified column position
+
|valign="top"|Add an item
 +
|-
 +
|valign="top"|AddItems
 +
|valign="top"|selectstatement as Character | commalist as Character | pipelist as Character | items as Array [,headers as Array[, headerwidths as Array]]
 +
|valign="top"|Add items based on an SQL SELECT query, a comma-separated list, a pipe-separated list or an array, optionally specifying a second array with column header text and a third with column header widths
 
|-
 
|-
 
|valign="top"|AddObject
 
|valign="top"|AddObject
Line 154: Line 162:
 
|valign="top"|Add an existing object or a new object, in which case the object's class must also be specified and optionally its caption
 
|valign="top"|Add an existing object or a new object, in which case the object's class must also be specified and optionally its caption
 
|-
 
|-
|valign="top"|RemoveObject
+
|valign="top"|Autofit
|valign="top"|existing as Object
+
|valign="top"|None
|valign="top"|Remove the specified object
+
|valign="top"|Resize the columns to fit the grid
|-
+
|valign="top"|Columns
+
|valign="top"|column as Numeric
+
|valign="top"|Return an object reference to the specified column
+
 
|-
 
|-
 
|valign="top"|Clear
 
|valign="top"|Clear
Line 166: Line 170:
 
|valign="top"|Clear the grid
 
|valign="top"|Clear the grid
 
|-
 
|-
|valign="top"|Autofit
+
|valign="top"|Columns
|valign="top"|None
+
|valign="top"|column as Numeric
|valign="top"|Resize the columns to fit the grid
+
|valign="top"|Return an object reference to the specified column
 
|-
 
|-
 
|valign="top"|DoScroll
 
|valign="top"|DoScroll
Line 174: Line 178:
 
|valign="top"|Scroll: 0 = up, 1 = down, 2 = page up, 3 = page down, 4 = left, 5 = right, 6 = page left, 7 = page right, 8 = top, 9 = bottom
 
|valign="top"|Scroll: 0 = up, 1 = down, 2 = page up, 3 = page down, 4 = left, 5 = right, 6 = page left, 7 = page right, 8 = top, 9 = bottom
 
|-
 
|-
|valign="top"|ActivateCell
+
|valign="top"|Goto
 +
|valign="top"|recordnumber as Numeric
 +
|valign="top"|Go to the specified record number
 +
|-
 +
|valign="top"|Item
 
|valign="top"|row as Numeric, column as Numeric
 
|valign="top"|row as Numeric, column as Numeric
|valign="top"|Select the cell at the specified row and column position
+
|valign="top"|Return the item text from the specified cell
 
|-
 
|-
|valign="top"|AddItem
+
|valign="top"|RemoveColumn
|valign="top"|data as Character
+
|valign="top"|column as Numeric
|valign="top"|Add an item
+
|valign="top"|Remove a column at the specified column position
 
|-
 
|-
|valign="top"|AddItems
+
|valign="top"|RemoveObject
|valign="top"|selectstatement as Character | commalist as Character | pipelist as Character | items as Array [,headers as Array[, headerwidths as Array]]
+
|valign="top"|existing as Object
|valign="top"|Add items based on an SQL SELECT query, a comma-separated list, a pipe-separated list or an array, optionally specifying a second array with column header text and a third with column header widths
+
|valign="top"|Remove the specified object
|-
+
|valign="top"|Sort
+
|valign="top"|column as Numeric, direction as Numeric
+
|valign="top"|Sort data on the specified column.  Data is sorted in descending order if direction < 0
+
 
|-
 
|-
 
|valign="top"|Search
 
|valign="top"|Search
Line 194: Line 198:
 
|valign="top"|Search for searchstring in the currently selected column
 
|valign="top"|Search for searchstring in the currently selected column
 
|-
 
|-
|valign="top"|Goto
+
|valign="top"|Sort
|valign="top"|recordnumber as Numeric
+
|valign="top"|column as Numeric, direction as Numeric
|valign="top"|Go to the specified record number
+
|valign="top"|Sort data on the specified column.  Data is sorted in descending order if direction < 0
|-
+
|valign="top"|Item
+
|valign="top"|row as Numeric, column as Numeric
+
|valign="top"|Return the item text from the specified cell
+
 
|-
 
|-
 
|}
 
|}

Revision as of 11:58, 29 April 2013

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.

Properties

This class supports the Common Properties plus the following:

Property Access (R/RW) Value Description
ActiveColumn RW Numeric Currently selected column
ActiveRow RW Numeric Currently selected row
AlternatingRowColors RW Boolean Whether rows have alternating background colors
ColumnCount RW Numeric Number of columns
GridLineColor RW Numeric Color of grid lines
GridLines RW Boolean Whether grid lines are displayed
HeaderHeight RW Numeric Column header height in pixels
Picture RW Character Filename of background image
Readonly RW Boolean Whether grid is readonly
Recno R Numeric Current record number
RecordMark RW Numeric Whether record number column is displayed: 0 (False), 1 (True)
RecordSource RW Character Source of data to which the grid is bound
RecordSourceType RW Numeric Data source type: 0 = table, 1 = alias, 4 = SQL statement
RelativeColumn R Numeric Currently selected column relative to the grid display
RelativeRow R Numeric Currently selected row relative to the grid display
RowColChange RW Numeric Type of cell movement made: 0 = no change, 1 = row change, 2 = column change, 3 = row and column change
RowCount RW Numeric Number of rows
RowHeight RW Numeric Row height in pixels
Rowid R Numeric Current record number
RowSource RW Character Source of data to which the grid is bound
RowSourceType RW Numeric Data source type: 0 = table, 1 = alias, 4 = SQL statement
Scrollbars RW Numeric Scrollbars displayed: 0 = none, 1 = horizontal, 2 = vertical
ViewMode RW Boolean View mode for split grids: 0 = grid view, 1 = form view, 2 = split view
WordWrap RW Boolean Whether text is word-wrapped

Methods

This class supports the Common Methods plus the following:

Method Args Description
ActivateCell row as Numeric, column as Numeric Select the cell at the specified row and column position
AddColumn column as Numeric Add a column at the specified column position
AddItem data as Character Add an item
AddItems selectstatement as Character | commalist as Character | pipelist as Character | items as Array [,headers as Array[, headerwidths as Array]] Add items based on an SQL SELECT query, a comma-separated list, a pipe-separated list or an array, optionally specifying a second array with column header text and a third with column header widths
AddObject existing as Object | newobject as Character, class as Character Add an existing object or a new object, in which case the object's class must also be specified and optionally its caption
Autofit None Resize the columns to fit the grid
Clear None Clear the grid
Columns column as Numeric Return an object reference to the specified column
DoScroll scroll as Numeric Scroll: 0 = up, 1 = down, 2 = page up, 3 = page down, 4 = left, 5 = right, 6 = page left, 7 = page right, 8 = top, 9 = bottom
Goto recordnumber as Numeric Go to the specified record number
Item row as Numeric, column as Numeric Return the item text from the specified cell
RemoveColumn column as Numeric Remove a column at the specified column position
RemoveObject existing as Object Remove the specified object
Search searchstring as Character Search for searchstring in the currently selected column
Sort column as Numeric, direction as Numeric Sort data on the specified column. Data is sorted in descending order if direction < 0

Events

This class supports the Common Events plus the following:

Event Args Description
afterRowChange column as Numeric Occurs after the when event on moving row
beforeRowChange None Occurs after data has changed and before the valid event
dragDrop source as Object, x as Numeric, y as Numeric, state as Numeric Occurs when an object is dropped into the grid
dragOver source as Object, x as Numeric, y as Numeric, state as Numeric Occurs when an object is dragged over the grid