wxformgrid
Description
A wxformgrid object is an area of a form where a table with rows and columns, row labels and column labels are displayed. The grid can be larger than the visible area.
Type Tags
wxformcontrol
Object Value
Properties
Property | Type | Description |
---|---|---|
_ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. |
__ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. It has the additional feature of being marked with the resolve keyword, so that object resolution can continue down this property. |
alignment | string | Specifies the default alignment for the cells. |
captureable | boolean |
Specifies whether or not the control events can be captured by the form when
the controlcapture() method is called.
|
colcount | integer | Specifies the number of columns in the grid. |
collabelalignment | string | Specifies the alignment for the column labels. |
collabelheight | integer | Specifies the height of the column label row in pixels. |
colwidthdraggable | boolean | Specifies whether the column width can be changed by the user. |
enabled | boolean | Specifies whether or not the control is enabled. |
focusable | boolean |
Specifies whether or not the control can have the input focus. For
wxformedittext objects this is always
.true .
|
font | wxfont | This the default font for the cells. |
form | wxform | Specifies the wxform object to which this edit control belongs. |
height | integer | Gives the height of the grid control, in pixels. |
labelfont | wxfont | This the font used for the labels. |
left | integer | Gives the position of the left side of the grid control relative to the left side of the form, in pixels. |
name | string | The name of the wxformgrid object. |
next | type(wxformcontrol) |
Specifies the next wxformcontrol on the same form.
|
oncellchange | event | An event that is triggered when the user changes the content of a cell. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
oncellleftclick | event | An event that is triggered when the user clicks with the left mouse button on a cell. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
oncellleftdblclick | event | An event that is triggered when the user double clicks with the left mouse button on a cell. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
oncellrightclick | event | An event that is triggered when the user clicks with the right mouse button on a cell. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
oncellrightdblclick | event | An event that is triggered when the user double clicks with the right mouse button on a cell. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
oncellselect | event | An event that is triggered when the user selects a cell. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
oncolwidthchange | event | An event that is triggered when the user resizes a column. The event handling function will receive the following parameters: (wxformgrid me, integer col[, type(*) reference]). The reference is only passed if it is provided by the user. |
ongotfocus | event | An event that is triggered when the grid control receives input focus. The event handling function will receive the following parameters: (wxformgrid me[, type(*) reference]) the reference is only passed if it is provided by the user. |
onlabelclick | event | An event that is triggered when the user clicks on a row or column label or the corner label. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. If the row is equal to -1 and the col is equal to -1, then the user clicked the corner label, otherwise if the row is equal to -1, they clicked a column label. If the col is equal to -1 they clicked a row label. |
onlabelleftdblclick | event | An event that is triggered when the user double clicks with the left mouse button on a label. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
onlabelrightclick | event | An event that is triggered when the user clicks with the right mouse button on a label. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
onlabelrightdblclick | event | An event that is triggered when the user double clicks with the right mouse button on a label. The event handling function will receive the following parameters: (wxformgrid me, integer row, integer col[, type(*) reference]) the reference is only passed if it is provided by the user. |
onlostfocus | event | An event that is triggered when the grid control loses input focus. The event handling function will receive the following parameters: (wxformgrid me[, type(*) reference]). The reference is only passed if it is provided by the user. |
onrowheightchange | event | An event that is triggered when the user resizes a row. The event handling function will receive the following parameters: (wxformgrid me, integer row[, type(*) reference]). The reference is only passed if it is provided by the user. |
rowcount | integer | Specifies the number of rows in the grid. |
rowheightdraggable | boolean | Specifies whether the row height can be changed by the user. |
rowlabelalignment | string | Specifies the alignment for the row labels. |
rowlabelwidth | integer | Specifies the width of the row label column in pixels. |
tooltip | string | Contains the test that is displayed as a tooltip for the control. |
top | integer | Gives the position of the top edge of the grid control relative to the top edge of the form, in pixels. |
type | type | Specifies the wxformgrid type object. |
visible | boolean | Specifies whether or not the control is visible. |
width | integer | Gives the width of the grid control, in pixels. |
Methods
enablecelleditcontrol()
Description
This method displays the edit control for the currently selected cell if the parameter passed is true, and hides the edit control (if currently displayed) if the parameter is false.
Prototype
wxformgridvar
.enablecelleditcontrol
(
boolean
)
enabled
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
enabled | .true | boolean |
If this parameter is equal to .true , then the edit control
for the current cell will be shown (if it is not currently). If
it is equal to .false , then it will hidden if
it is currently displayed.
|
getcellalignment()
Description
Retrieves the current alignment for the desired cell as a string in the form described for setting the alignment.
Prototype
wxformgridvar
.getcellalignment
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row in which the cell is located. |
col | None | integer | The column in which the cell is located. |
getcellbackgroundrgb()
Description
Retrieves the current background color for a specific grid cell.
Prototype
wxformgridvar
.getcellbackgroundrgb
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | Contains the row of the cell for which the background color is being retrieved. |
col | None | integer | Contains the column of the cell for which the background color is being retrieved. |
getcellchoice()
Description
Retrieves the value of the choice for the desired cell and index value or
.nul
if the cell is not a choice cell or if the
index value is too large.
Prototype
wxformgridvar
.getcellchoice
(
integer
,
integer row
,
integer col
)
item
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row in which the cell is located. |
col | None | integer | The column in which the cell is located. |
item | 1 | integer | The index of the choice in the list. |
getcellchoiceallowothers()
Description
Retrieves .true
if the desired cell allows other entries
than the ones from its list of choices, .false
if
it does not, or .nul
if the cell is not a choice
cell.
Prototype
wxformgridvar
.getcellchoiceallowothers
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row in which the cell is located. |
col | None | integer | The column in which the cell is located. |
getcellchoicecount()
Description
Retrieves the number of choices for the desired cell or
.nul
if the cell is not a choice cell.
Prototype
wxformgridvar
.getcellchoicecount
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row in which the cell is located. |
col | None | integer | The column in which the cell is located. |
getcellfont()
Description
Retrieves the current font for the desired cell as a wxfont
object, or .nul
if no font is assigned to the cell
or as the default for the grid.
Prototype
wxformgridvar
.getcellfont
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row in which the cell is located. |
col | None | integer | The column in which the cell is located. |
getcelltextrgb()
Description
Retrieves the current text color for a specific grid cell.
Prototype
wxformgridvar
.getcelltextrgb
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | Contains the row of the cell for which the text color is being retrieved. |
col | None | integer | Contains the column of the cell for which the text color is being retrieved. |
getcellvalue()
Description
Retrieves the value for the desired cell.
Prototype
wxformgridvar
.getcellvalue
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row in which the cell is located. |
col | None | integer | The column in which the cell is located. |
getcollabel()
Description
Retrieves the column label for the desired column.
Prototype
wxformgridvar
.getcollabel
(
integer
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
col | None | integer | The index of the column for which the label is retrieved. |
getcolwidth()
Description
Gets the width of the designated column.
Prototype
wxformgridvar
.getcolwidth
(
integer
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
col | None | integer | The column for which to retrieve the width value. |
getcursorcol()
Description
Retrieves the col where the grid cursor is currently located.
Prototype
wxformgridvar
.getcursorcol
()
Parameters
None
getcursorrow()
Description
Retrieves the row where the grid cursor is currently located.
Prototype
wxformgridvar
.getcursorrow
()
Parameters
None
getrowheight()
Description
Gets the height of the designated row.
Prototype
wxformgridvar
.getrowheight
(
integer
)
row
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row for which to retrieve the height value. |
getrowlabel()
Description
Retrieves the row label for the desired row.
Prototype
wxformgridvar
.getrowlabel
(
integer
)
row
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The index of the row for which the label is retrieved. |
getselectedcol()
Description
Retrieves the next selected column following or equal to the start column. If not supplied it defaults to 1. This only works if the form has been placed into a container. Otherwise it always returns 0. To find all of the selected columns, start at 1 and continue until you get a return value of 0. There is a known issue with the wxWidgets component. If you are Ctrl-clicking labels, any label preceding an earlier one does not appear in the internal list of selected labels.
Prototype
wxformgridvar
.getselectedcol
(
integer
,
integer selectedcol
)
startcol
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
selectedcol | None | integer | This must be a pre-initialized integer object. The return value will be placed in the variable passed. If no column is selected (or none is selected equal to or following the startcol parameter), then the return value is 0. |
startcol | 1 | integer | Contains the column from which to start checking for selected columns. |
getselectedrow()
Description
Retrieves the next selected row following or equal to the start row. If not supplied it defaults to 1. This only works if the form has been placed into a container. Otherwise it always returns 0. To find all of the selected rows, start at 1 and continue until you get a return value of 0. There is a known issue with the wxWidgets component. If you are Ctrl-clicking labels, any label preceding an earlier one does not appear in the internal list of selected labels.
Prototype
wxformgridvar
.getselectedrow
(
integer
,
integer selectedrow
)
startrow
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
selectedrow | None | integer | This must be a pre-initialized integer object. The return value will be placed in the variable passed. If no row is selected (or none is selected equal to or following the startrow parameter), then the return value is 0. |
startrow | 1 | integer | Contains the row from which to start checking for selected rows. |
iscellreadonly()
Description
Retrieves whether or not the desired cell is read only.
Prototype
wxformgridvar
.iscellreadonly
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row in which the cell is located. |
col | None | integer | The column in which the cell is located. |
remove()
Description
Removes the control from the form. If any object has a reference to the control, those references will no longer be valid. It is not safe to attempt to use a control after this method has been called.
Prototype
wxformgridvar
.remove
()
Parameters
None
setalignments()
Description
This method assigns the alignments for the row and column labels and the
default cell alignment. The wxformgrid object itself is
returned, to allow multiple methods to be put into one expression.
The alignment is for both horizontal and vertical alignment. The
string can be made up of two comma separated string values. The valid
values are: left
, right
,
top
, and bottom
. Providing two
values for the same vector of alignment is an error, such as
"left,right"
. If an element is not supplied, it is
assumed to be middle (in either direction). Supplying an empty string
would create an alignment both horizontally and vertically centered.
Prototype
wxformgridvar
.setalignments
(
string
,
string rowlabelalignment
,
string collabelalignment
)
alignment
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
rowlabelalignment | The current setting of the rowlabelalignment property | string | The alignment string for both horizontal and vertical alignment for row labels. |
collabelalignment | The current setting of the collabelalignment property | string | The alignment string for both horizontal and vertical alignment for column labels. |
alignment | The current setting for default alignment for cells that have no specifically defined alignment. | string | The default alignment string for both horizontal and vertical alignment for cells. |
setcaptureable()
Description
This method is used to determine whether the events for the control can be captured and passed to the form or not. By default, events can be captured.
Prototype
wxformgridvar
.setcaptureable
(
boolean
)
captureable
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
captureable | None | boolean |
Sets whether or not the events for this control can be captured by the form
using the controlcapture() method of the
form.
|
setcellalignment()
Description
Sets the alignment for the cell or cells (if used with a range). The wxformgrid object itself is returned, to allow multiple methods to be put into one expression. It is not possible to set a cell back to being controlled by the default grid alignment setting. This limitation is part of the underlying grid control used for the implementation.
Prototype
wxformgridvar
.setcellalignment
(
integer
,
integer row
,
string col
,
integer alignment
,
integer startrow
,
integer endrow
,
integer startcol
)
endcol
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer |
The row in which the cell is found. If not specified, then the
startrow and endrow
parameters are used.
|
col | None | integer |
The column in which the cell is found. If not specified, then the
startcol and endcol
parameters are used.
|
alignment | The current cell alignment if already assigned else the default alignment | string |
The alignment to be assigned to the cell. The alignment is for both horizontal
and vertical alignment. The string can be made up of two comma
separated string values. The valid values are:
left , right ,
top , and bottom . Providing
two values for the same vector of alignment is an error, such as
"left,right" . If an element is not supplied,
it is assumed to be middle (in either direction). Supplying an
empty string would create an alignment both horizontally and
vertically centered.
|
startrow | 1 | integer | The starting row of a range for which to assign the alignment. |
endrow | Number of rows in the grid | integer | The ending row of a range for which to assign the alignment. |
startcol | 1 | integer | The starting column of a range for which to assign the alignment. |
endcol | Number of columns in the grid | integer | The ending column of a range for which to assign the alignment. |
setcellbackgroundrgb()
Description
Sets the background color for the cell or cells (if used with a range). The wxformgrid object itself is returned, to allow multiple methods to be put into one expression. It is not possible to set a cell back to being controlled by the default grid background color setting. This limitation is part of the underlying grid control used for the implementation.
Prototype
wxformgridvar
.setcellbackgroundrgb
(
integer
,
integer row
,
integer col
,
integer rgb
,
integer startrow
,
integer endrow
,
integer startcol
)
endcol
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer |
The row in which the cell is found. If not specified, then the
startrow and endrow
parameters are used.
|
col | None | integer |
The column in which the cell is found. If not specified, then the
startcol and endcol
parameters are used.
|
rgb | None | integer | The background color to be assigned to the cell. |
startrow | 1 | integer | The starting row of a range for which to assign the background color. |
endrow | Number of rows in the grid | integer | The ending row of a range for which to assign the background color. |
startcol | 1 | integer | The starting column of a range for which to assign the background color. |
endcol | Number of columns in the grid | integer | The ending column of a range for which to assign the background color. |
setcellchoices()
Description
Sets the currently selected value plus the list of choices for the desired
cell or range. The choices are not named parameters, they are simply
listed as separate string parameters for as many as there are
choices. The wxformgrid object itself is returned, to
allow multiple methods to be put into one expression. Calling this
method with no choices values and the
allowothers
parameter set to
.true
will set the cell back to being a normal
string cell. Calling this method with no choices values and the
allowothers
parameter set to
.false
will result in an error. To set or get a
choice (or other value if allowed) for a choice cell using the
setcellvalue()
and
getcellvalue()
methods.
Note | |
---|---|
Any
unnamed parameter used when calling this method will be considered to
be a choice! It is essential that the
|
Prototype
wxformgridvar
.setcellchoices
(
integer
,
integer row
,
string col
,
boolean value
,
integer allowothers
,
integer startrow
,
integer endrow
,
integer startcol
,
string endcol
,
string choices
,
)
…
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer |
The row in which the cell is found. If not specified, then the
startrow and endrow
parameters are used.
|
col | None | integer |
The column in which the cell is found. If not specified, then the
startcol and endcol
parameters are used.
|
value | The existing value in the cell | string | The value to be assigned to the cell. |
allowothers | .true | boolean |
If this value is .true then the combo box will be a
dropedit style, if it is .false then it will
be a droplist style.
|
startrow | 1 | integer | The starting row of a range for which to assign the value. |
endrow | Number of rows in the grid | integer | The ending row of a range for which to assign the value. |
startcol | 1 | integer | The starting column of a range for which to assign the value. |
endcol | Number of columns in the grid | integer | The ending column of a range for which to assign the value. |
choices | None | string | This string parameter can be used to set the choices by placing them into the string separated by the character value 0 ("{0}"). This allows programmatic/dynamic creation of the list of choices (for example by reading records from a database and creating the string dynamically). |
None | string | The string to be added as a choice. | |
… | None |
setcellfont()
Description
Sets the font to be used for the cell or cells (if using a range) in the grid control. The wxformgrid object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgridvar
.setcellfont
(
integer
,
integer row
,
wxfont col
,
integer font
,
integer startrow
,
integer endrow
,
integer startcol
)
endcol
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer |
The row in which the cell is found. If not specified, then the
startrow and endrow
parameters are used.
|
col | None | integer |
The column in which the cell is found. If not specified, then the
startcol and endcol
parameters are used.
|
font | None | wxfont | The wxfont object that will be used to format the text in the cell(s). |
startrow | 1 | integer | The starting row of a range for which to assign the font. |
endrow | Number of rows in the grid | integer | The ending row of a range for which to assign the font. |
startcol | 1 | integer | The starting column of a range for which to assign the font. |
endcol | Number of columns in the grid | integer | The ending column of a range for which to assign the font. |
setcellreadonly()
Description
Sets the desired cell or range to read only. The wxformgrid object itself is returned, to allow multiple methods to be put into one expression. Calling this method with no parameters will clear all values from the grid.
Prototype
wxformgridvar
.setcellreadonly
(
integer
,
integer row
,
boolean col
,
integer readonly
,
integer startrow
,
integer endrow
,
integer startcol
)
endcol
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer |
The row in which the cell is found. If not specified, then the
startrow and endrow
parameters are used.
|
col | None | integer |
The column in which the cell is found. If not specified, then the
startcol and endcol
parameters are used.
|
readonly | .true | boolean | Whether the cell will be set to read only or not. |
startrow | 1 | integer | The starting row of a range for which to set cells to read only. |
endrow | Number of rows in the grid | integer | The ending row of a range for which to set cells to read only. |
startcol | 1 | integer | The starting column of a range for which to set cells to read only. |
endcol | Number of columns in the grid | integer | The ending column of a range for which to set cells to read only. |
setcelltextrgb()
Description
Sets the text color for the cell or cells (if used with a range). The wxformgrid object itself is returned, to allow multiple methods to be put into one expression. It is not possible to set a cell back to being controlled by the default grid text color setting. This limitation is part of the underlying grid control used for the implementation.
Prototype
wxformgridvar
.setcelltextrgb
(
integer
,
integer row
,
integer col
,
integer rgb
,
integer startrow
,
integer endrow
,
integer startcol
)
endcol
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer |
The row in which the cell is found. If not specified, then the
startrow and endrow
parameters are used.
|
col | None | integer |
The column in which the cell is found. If not specified, then the
startcol and endcol
parameters are used.
|
rgb | None | integer | The text color to be assigned to the cell. |
startrow | 1 | integer | The starting row of a range for which to assign the text color. |
endrow | Number of rows in the grid | integer | The ending row of a range for which to assign the text color. |
startcol | 1 | integer | The starting column of a range for which to assign the text color. |
endcol | Number of columns in the grid | integer | The ending column of a range for which to assign the text color. |
setcellvalue()
Description
Sets the value for the desired cell or range. The wxformgrid object itself is returned, to allow multiple methods to be put into one expression. Calling this method with no parameters will clear all values from the grid.
Prototype
wxformgridvar
.setcellvalue
(
integer
,
integer row
,
string col
,
array value
,
integer valuearray
,
integer startrow
,
integer endrow
,
integer startcol
)
endcol
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer |
The row in which the cell is found. If not specified, then the
startrow and endrow
parameters are used.
|
col | None | integer |
The column in which the cell is found. If not specified, then the
startcol and endcol
parameters are used.
|
value | None | string | The value to be assigned to the cell. |
valuearray | None | array |
This is an array of values to be assigned to multiple cells. The array is
structured as follows: a[row,col], so to assign a group of values
in one operation, for each row an array element is assigned the
corresponding string value for each column. The row number is not
a relative offset, it and the column number should directly
reflect the position in the grid itself. Use the
startrow , endrow ,
startcol , and
endcol parameters to restrict the updates
to only a certain range.
|
startrow | 1 | integer | The starting row of a range for which to assign the value. |
endrow | Number of rows in the grid | integer | The ending row of a range for which to assign the value. |
startcol | 1 | integer | The starting column of a range for which to assign the value. |
endcol | Number of columns in the grid | integer | The ending column of a range for which to assign the value. |
setcollabelheight()
Description
Sets the height of the column labels. By setting this to 1, the column labels can be hidden. The wxformgrid object itself is returned, to allow multiple methods to be put into one expression.
Prototype
wxformgridvar
.setcollabelheight
(
integer
)
collabelheight
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
collabelheight | None | integer | The height in pixels of the column label row. |
setcollabels()
Description
Assigns labels to the columns in a grid control. The starting column is used to determine where the assignments begin. Multiple labels can be assigned in one call and each one will follow the next sequentially. The wxformgrid object itself is returned, to allow multiple methods to be put into one expression.
Prototype
wxformgridvar
.setcollabels
(
integer
,
string startcol
,
)
…
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
startcol | 1 | integer | The column to which to assign the first of the labels. The remaining strings (if any) will be assigned sequentially following the first one. |
None | string |
The string to be assigned to the label at the position described by the
startcol .
| |
… | None |
setcolwidths()
Description
Sets the width of the designated column or columns. If the
col
parameter is specified, then the
startcol
and endcol
parameters cannot be specified and only one width value can be
specified, either named or unnamed. If the
colwidth
parameter is specified, then no
unnamed parameters can be used. The wxformgrid object
itself is returned, to allow multiple methods to be put into one
expression.
Prototype
wxformgridvar
.setcolwidths
(
integer
,
integer col
,
integer colwidth
,
integer startcol
,
integer endcol
,
)
…
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
col | None | integer | The column to which to apply the width value. |
colwidth | The initial width for all columns | integer | The width of the specified column. |
startcol | 1 | integer | The starting column to which to apply the width value(s). |
endcol | Number of columns in the grid | integer | The starting column to which to apply the width value(s). |
None | integer | The width in pixels of the first column in sequence. | |
… | None |
setcursorposition()
Description
Sets the position of the grid cursor. The position must be within the defined rows and columns of the grid.
Prototype
wxformgridvar
.setcursorposition
(
integer
,
integer row
)
col
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row into which the grid cursor should be placed. |
col | None | integer | The column into which the grid cursor should be placed. |
setdraggability()
Description
Determines whether the row heights and/or column widths can be modified by the user. The wxformgrid object itself is returned, to allow multiple methods to be put into one expression.
Prototype
wxformgridvar
.setdraggability
(
boolean
,
boolean rowheightdraggable
)
colwidthdraggable
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
rowheightdraggable | The current setting of the rowheightdraggable property | boolean |
If this is set to .true , then the heights of the rows can
be modified by the user.
|
colwidthdraggable | The current setting of the colwidthdraggable property | boolean |
If this is set to .true , then the widths of the columns can
be modified by the user.
|
setenabled()
Description
Sets the enabled state of the grid control. The wxformgrid object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgridvar
.setenabled
(
boolean
)
enabled
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
enabled | None | boolean | The desired enabled state for the grid control. |
setfocus()
Description
Sets focus to the control, provided that it is not invisible or disabled. If this is called for a form that is not yet in a container, then nothing will happen except that the focuscontrol of the wxform object will be set. Once the form is placed in a container, the control will get focus and the ongotfocus event will fire.
Prototype
wxformgridvar
.setfocus
()
Parameters
None
setfont()
Description
Sets the default font to be used for the text in the grid control. The wxformgrid object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgridvar
.setfont
(
wxfont
)
font
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
font | None | wxfont | The wxfont object that will be used to format the text in the cells and labels. |
setlabelfont()
Description
Sets the font to be used for the row and column labels in the grid control. The wxformgrid object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgridvar
.setlabelfont
(
wxfont
)
font
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
font | None | wxfont | The wxfont object that will be used to format the text in the labels. |
setname()
Description
Sets the name of the grid control. The wxformgrid object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgridvar
.setname
(
string
)
name
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
name | None | string | The new name for the grid control. |
setnext()
Description
Sets the position of the control in the z-order and tab order.
Prototype
wxformgridvar
.setnext
(
type(wxformcontrol)
)
next
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
next | None | type(wxformcontrol) |
Calling the method with the value .nul sets a control to be
the last one in the ring (the one before form.firstcontrol) and
so has the highest z-order, and passing any other control as the
argument puts the target control immediately below the one
specified as the parameter. The visible stacking of controls on a
form is such that the earliest in the ring is the furthest back
in the z-order.
|
setposition()
Description
Sets the size and/or position of the grid control. The wxformgrid object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgridvar
.setposition
(
integer
,
integer left
,
integer top
,
integer width
)
height
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
left | The current value of the left property | integer | The new position of the left side of the grid control on the form. |
top | The current value of the top property | integer | The new position of the top edge of the grid control on the form. |
width | The current value of the width property | integer | The new width of the grid control on the form. |
height | The current value of the height property | integer | The new height of the grid control on the form. |
setrowheights()
Description
Sets the height of the designated row or rows. If the
row
parameter is specified, then the
startrow
and endrow
parameters cannot be specified and only one height value can be
specified, either named or unnamed. If the
rowheight
parameter is specified, then no
unnamed parameters can be used. The wxformgrid object
itself is returned, to allow multiple methods to be put into one
expression.
Prototype
wxformgridvar
.setrowheights
(
integer
,
integer row
,
integer rowheight
,
integer startrow
,
integer endrow
)
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
row | None | integer | The row to which to apply the height value. |
rowheight | The initial height for all rows | integer | The height of the specified row. |
startrow | 1 | integer | The starting row to which to apply the height value(s). |
endrow | Number of rows in the grid | integer | The starting row to which to apply the height value(s). |
None | integer | The height in pixels of the first row in sequence. |
setrowlabels()
Description
Assigns labels to the rows in a grid control. The starting row is used to determine where the assignments begin. Multiple labels can be assigned in one call and each one will follow the next sequentially. The wxformgrid object itself is returned, to allow multiple methods to be put into one expression.
Prototype
wxformgridvar
.setrowlabels
(
integer
,
string startrow
,
)
…
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
startrow | 1 | integer | The row to which to assign the first of the labels. The remaining strings (if any) will be assigned sequentially following the first one. |
None | string |
The string to be assigned to the label at the position described by the
startrow .
| |
… | None |
setrowlabelwidth()
Description
Sets the width of the row labels. By setting this to 1, the row labels can be hidden. The wxformgrid object itself is returned, to allow multiple methods to be put into one expression.
Prototype
wxformgridvar
.setrowlabelwidth
(
integer
)
rowlabelwidth
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
rowlabelwidth | None | integer | The width in pixels of the row label column. |
settooltip()
Description
Sets the text for the tooltip associated with the control. The wxformgrid object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgridvar
.settooltip
(
string
)
tooltip
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
tooltip | None | string | The new text to set for the tooltip. |
setvisible()
Description
Sets the visibility of the grid control. The wxformgrid object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgridvar
.setvisible
(
boolean
)
visible
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
visible | None | boolean | The desired visibility of the grid control. |