SIMPOL Documentation

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

PropertyTypeDescription
_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.
alignmentstring Specifies the default alignment for the cells.
captureableboolean Specifies whether or not the control events can be captured by the form when the controlcapture() method is called.
colcountinteger Specifies the number of columns in the grid.
collabelalignmentstring Specifies the alignment for the column labels.
collabelheightinteger Specifies the height of the column label row in pixels.
colwidthdraggableboolean Specifies whether the column width can be changed by the user.
enabledboolean Specifies whether or not the control is enabled.
focusableboolean Specifies whether or not the control can have the input focus. For wxformedittext objects this is always .true.
fontwxfont This the default font for the cells.
formwxform Specifies the wxform object to which this edit control belongs.
heightinteger Gives the height of the grid control, in pixels.
labelfontwxfont This the font used for the labels.
leftinteger Gives the position of the left side of the grid control relative to the left side of the form, in pixels.
namestring The name of the wxformgrid object.
nexttype(wxformcontrol) Specifies the next wxformcontrol on the same form.
oncellchangeevent 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.
oncellleftclickevent 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.
oncellleftdblclickevent 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.
oncellrightclickevent 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.
oncellrightdblclickevent 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.
oncellselectevent 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.
oncolwidthchangeevent 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.
ongotfocusevent 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.
onlabelclickevent 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.
onlabelleftdblclickevent 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.
onlabelrightclickevent 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.
onlabelrightdblclickevent 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.
onlostfocusevent 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.
onrowheightchangeevent 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.
rowcountinteger Specifies the number of rows in the grid.
rowheightdraggableboolean Specifies whether the row height can be changed by the user.
rowlabelalignmentstring Specifies the alignment for the row labels.
rowlabelwidthinteger Specifies the width of the row label column in pixels.
tooltipstring Contains the test that is displayed as a tooltip for the control.
topinteger Gives the position of the top edge of the grid control relative to the top edge of the form, in pixels.
typetype Specifies the wxformgrid type object.
visibleboolean Specifies whether or not the control is visible.
widthinteger 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
ParameterDefault valueType nameDescription
enabled.trueboolean 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 row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is located.
colNoneinteger The column in which the cell is located.

getcellbackgroundrgb()

Description

Retrieves the current background color for a specific grid cell.

Prototype

wxformgridvar.getcellbackgroundrgb ( integer row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger Contains the row of the cell for which the background color is being retrieved.
colNoneinteger 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 row, integer col, integer item )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is located.
colNoneinteger The column in which the cell is located.
item1integer 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 row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is located.
colNoneinteger 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 row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is located.
colNoneinteger 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 row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is located.
colNoneinteger The column in which the cell is located.

getcelltextrgb()

Description

Retrieves the current text color for a specific grid cell.

Prototype

wxformgridvar.getcelltextrgb ( integer row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger Contains the row of the cell for which the text color is being retrieved.
colNoneinteger 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 row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is located.
colNoneinteger The column in which the cell is located.

getcollabel()

Description

Retrieves the column label for the desired column.

Prototype

wxformgridvar.getcollabel ( integer col )

Parameters
ParameterDefault valueType nameDescription
colNoneinteger 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
ParameterDefault valueType nameDescription
colNoneinteger 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
ParameterDefault valueType nameDescription
rowNoneinteger 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
ParameterDefault valueType nameDescription
rowNoneinteger 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 selectedcol, integer startcol )

Parameters
ParameterDefault valueType nameDescription
selectedcolNoneinteger 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.
startcol1integer 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 selectedrow, integer startrow )

Parameters
ParameterDefault valueType nameDescription
selectedrowNoneinteger 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.
startrow1integer 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 row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is located.
colNoneinteger 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 rowlabelalignment, string collabelalignment, string alignment )

Parameters
ParameterDefault valueType nameDescription
rowlabelalignmentThe current setting of the rowlabelalignment propertystring The alignment string for both horizontal and vertical alignment for row labels.
collabelalignmentThe current setting of the collabelalignment propertystring The alignment string for both horizontal and vertical alignment for column labels.
alignmentThe 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
ParameterDefault valueType nameDescription
captureableNoneboolean 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 row, integer col, string alignment, integer startrow, integer endrow, integer startcol, integer endcol )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is found. If not specified, then the startrow and endrow parameters are used.
colNoneinteger The column in which the cell is found. If not specified, then the startcol and endcol parameters are used.
alignmentThe current cell alignment if already assigned else the default alignmentstring 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.
startrow1integer The starting row of a range for which to assign the alignment.
endrowNumber of rows in the gridinteger The ending row of a range for which to assign the alignment.
startcol1integer The starting column of a range for which to assign the alignment.
endcolNumber of columns in the gridinteger 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 row, integer col, integer rgb, integer startrow, integer endrow, integer startcol, integer endcol )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is found. If not specified, then the startrow and endrow parameters are used.
colNoneinteger The column in which the cell is found. If not specified, then the startcol and endcol parameters are used.
rgbNoneinteger The background color to be assigned to the cell.
startrow1integer The starting row of a range for which to assign the background color.
endrowNumber of rows in the gridinteger The ending row of a range for which to assign the background color.
startcol1integer The starting column of a range for which to assign the background color.
endcolNumber of columns in the gridinteger 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]Note

Any unnamed parameter used when calling this method will be considered to be a choice! It is essential that the row and col parameters or the startrow/endrow and startcol/endcol parameters are specified by name when calling this method!

Prototype

wxformgridvar.setcellchoices ( integer row, integer col, string value, boolean allowothers, integer startrow, integer endrow, integer startcol, integer endcol, string choices, string , )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is found. If not specified, then the startrow and endrow parameters are used.
colNoneinteger The column in which the cell is found. If not specified, then the startcol and endcol parameters are used.
valueThe existing value in the cellstring The value to be assigned to the cell.
allowothers.trueboolean 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.
startrow1integer The starting row of a range for which to assign the value.
endrowNumber of rows in the gridinteger The ending row of a range for which to assign the value.
startcol1integer The starting column of a range for which to assign the value.
endcolNumber of columns in the gridinteger The ending column of a range for which to assign the value.
choicesNonestring 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).
 Nonestring 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 row, integer col, wxfont font, integer startrow, integer endrow, integer startcol, integer endcol )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is found. If not specified, then the startrow and endrow parameters are used.
colNoneinteger The column in which the cell is found. If not specified, then the startcol and endcol parameters are used.
fontNonewxfont The wxfont object that will be used to format the text in the cell(s).
startrow1integer The starting row of a range for which to assign the font.
endrowNumber of rows in the gridinteger The ending row of a range for which to assign the font.
startcol1integer The starting column of a range for which to assign the font.
endcolNumber of columns in the gridinteger 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 row, integer col, boolean readonly, integer startrow, integer endrow, integer startcol, integer endcol )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is found. If not specified, then the startrow and endrow parameters are used.
colNoneinteger The column in which the cell is found. If not specified, then the startcol and endcol parameters are used.
readonly.trueboolean Whether the cell will be set to read only or not.
startrow1integer The starting row of a range for which to set cells to read only.
endrowNumber of rows in the gridinteger The ending row of a range for which to set cells to read only.
startcol1integer The starting column of a range for which to set cells to read only.
endcolNumber of columns in the gridinteger 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 row, integer col, integer rgb, integer startrow, integer endrow, integer startcol, integer endcol )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is found. If not specified, then the startrow and endrow parameters are used.
colNoneinteger The column in which the cell is found. If not specified, then the startcol and endcol parameters are used.
rgbNoneinteger The text color to be assigned to the cell.
startrow1integer The starting row of a range for which to assign the text color.
endrowNumber of rows in the gridinteger The ending row of a range for which to assign the text color.
startcol1integer The starting column of a range for which to assign the text color.
endcolNumber of columns in the gridinteger 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 row, integer col, string value, array valuearray, integer startrow, integer endrow, integer startcol, integer endcol )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row in which the cell is found. If not specified, then the startrow and endrow parameters are used.
colNoneinteger The column in which the cell is found. If not specified, then the startcol and endcol parameters are used.
valueNonestring The value to be assigned to the cell.
valuearrayNonearray 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.
startrow1integer The starting row of a range for which to assign the value.
endrowNumber of rows in the gridinteger The ending row of a range for which to assign the value.
startcol1integer The starting column of a range for which to assign the value.
endcolNumber of columns in the gridinteger 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
ParameterDefault valueType nameDescription
collabelheightNoneinteger 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 startcol, string , )

Parameters
ParameterDefault valueType nameDescription
startcol1integer The column to which to assign the first of the labels. The remaining strings (if any) will be assigned sequentially following the first one.
 Nonestring 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 col, integer colwidth, integer startcol, integer endcol, integer , )

Parameters
ParameterDefault valueType nameDescription
colNoneinteger The column to which to apply the width value.
colwidthThe initial width for all columnsinteger The width of the specified column.
startcol1integer The starting column to which to apply the width value(s).
endcolNumber of columns in the gridinteger The starting column to which to apply the width value(s).
 Noneinteger 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 row, integer col )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row into which the grid cursor should be placed.
colNoneinteger 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 rowheightdraggable, boolean colwidthdraggable )

Parameters
ParameterDefault valueType nameDescription
rowheightdraggableThe current setting of the rowheightdraggable propertyboolean If this is set to .true, then the heights of the rows can be modified by the user.
colwidthdraggableThe current setting of the colwidthdraggable propertyboolean 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
ParameterDefault valueType nameDescription
enabledNoneboolean 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
ParameterDefault valueType nameDescription
fontNonewxfont 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
ParameterDefault valueType nameDescription
fontNonewxfont 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
ParameterDefault valueType nameDescription
nameNonestring 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
ParameterDefault valueType nameDescription
nextNonetype(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 left, integer top, integer width, integer height )

Parameters
ParameterDefault valueType nameDescription
leftThe current value of the left propertyinteger The new position of the left side of the grid control on the form.
topThe current value of the top propertyinteger The new position of the top edge of the grid control on the form.
widthThe current value of the width propertyinteger The new width of the grid control on the form.
heightThe current value of the height propertyinteger 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 row, integer rowheight, integer startrow, integer endrow, integer )

Parameters
ParameterDefault valueType nameDescription
rowNoneinteger The row to which to apply the height value.
rowheightThe initial height for all rowsinteger The height of the specified row.
startrow1integer The starting row to which to apply the height value(s).
endrowNumber of rows in the gridinteger The starting row to which to apply the height value(s).
 Noneinteger 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 startrow, string , )

Parameters
ParameterDefault valueType nameDescription
startrow1integer The row to which to assign the first of the labels. The remaining strings (if any) will be assigned sequentially following the first one.
 Nonestring 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
ParameterDefault valueType nameDescription
rowlabelwidthNoneinteger 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
ParameterDefault valueType nameDescription
tooltipNonestring 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
ParameterDefault valueType nameDescription
visibleNoneboolean The desired visibility of the grid control.