Username: Password:

Table Plug-in Scripting Reference



Overview

The table plugin creates multi-cell tables that can be dynamically re-configured.

There are a variety of styles and cell size options. Cells can have formatted text in each cell.

Advanced tables should use sub objects of any type for each cell. The cell name can be used to reference sub objects.

Messages: nodemove, nodechange, nodeselect, nodeactive

Nodemove is sent when the position of the table changes.

Nodechange is sent when the table's cells are added or deleted.

Nodeselect is sent when the select state of the table changes.

Nodeactive is sent when the active state of the table changes.

 

Commands and Functions



activeget, activeset

active TF = activeget(node name $)
activeset(node name $, active TF)

Turn on or off the active state of the entire table.

Inactive tables are drawn in gray, cells are not selectable.

Individual cells can be activated or deactivated with the cellactiveset property
See: cellactiveset, cellactiveget



boundsget, boundsset

rectangle $ = boundsget(node name $)
boundsset(node name $, rectangle $)

Get or set the boundary rectangle of the object.



cellactiveget, cellactiveset

active TF = cellactiveget(node name $, col #, row #)
cellactiveset(node name $, col #, row #, active TF)

Get or set the active property of a cell. Inactive cells are drawn in gray and are not selectable.

The entire table can be activated or deactivated with the activeset property.
See: activeset, activeget


cellbounds

rectangle $ = cellbounds(node name $, col #, row #)

Returns the boundary rectangle of an individual cell. This is useful for using a table to format the size of sub objects.









celledgebottomget, celledgebottomset, celledgeleftget, celledgeleftset, celledgerightget, celledgerightset, celledgetopget, celledgetopset

edge # = celledgebottomget(node name $, col #, row #)
celledgebottomset(node name $, col #, row #, edge #)
edge # = celledgeleftget(node name $, col #, row #)
celledgeleftset(node name $, col #, row #, edge #)
edge # = celledgerightget(node name $, col #, row #)
celledgerightset(node name $, col #, row #, edge #)
edge # = celledgetopget(node name $, col #, row #)
celledgetopset(node name $, col #, row #, edge #)

Get or set the top, left, bottom, or right edge of the cell. This allows a line to be drawn along one side of the cell in the current line color.
See: celllinecolorset, celllinecolorget, celllinesizeset, celllinesizeget



cellfillcolorget, cellfillcolorset

fill color $ = cellfillcolorget(node name $, col #, row #)
cellfillcolorset(node name $, col #, row #, fill color $)

Get or set the fill color for the cells.



cellfontnameget, cellfontnameset

fontname $ = cellfontnameget(node name $, col #, row #)
cellfontnameset(node name $, col #, row #, fontname $)

Get or set the font name for the given cell.



cellfontsizeget, cellfontsizeset

fontsize # = cellfontsizeget(node name $, col #, row #)
cellfontsizeset(node name $, col #, row #, fontsize #)

Get or set the font size for the given cell.



cellfontstyleget, cellfontstyleset

font style name $ = cellfontstyleget(node name $, col #, row #)
cellfontstyleset(node name $, col #, row #, font style name $)

Get or set the font style for the given cell. Available styles include: plain, bold, italic, and underline.



cellgutterget, cellgutterset

cell gutter # = cellgutterget(node name $, col #, row #)
cellgutterset(node name $, col #, row #, cell gutter #)

Get or set the text gutter inside the cell.



cellhiliteget, cellhiliteset

cell hilite $ = cellhiliteget(node name $, col #, row #)
cellhiliteset(node name $, col #, row #, cell hilite $)

Get or set the hilite for each cell, which draws a special border on the cell showing mouse control.

Hilites include: thin, thick, gray, thick gray, dark, light, very dark, very light, and none.



celllinecolorget, celllinecolorset

line color $ = celllinecolorget(node name $, col #, row #)
celllinecolorset(node name $, col #, row #, line color $)

Get or set the line color for the cells.
See: celllinesizeset, celllinesizeget



celllinesizeget, celllinesizeset

line size # = celllinesizeget(node name $, col #, row #)
celllinesizeset(node name $, col #, row #, line size #)

Get or set the line size around the cells.
See: celllinecolorset, celllinecolorget



cellnameget, cellnameset

cell name $ = cellnameget(node name $, col #, row #)
cellnameset(node name $, col #, row #, cell name $)

Get or set the cell name of any cell. Cell names can be displayed, or point to a sub object node for advanced tables.



cellrefget, cellrefset

cell ref # = cellrefget(node name $, col #, row #)
cellrefset(node name $, col #, row #, cell ref #)

Get or set the cell ref for each cell. This is a user defined number that sticks to the cell.



cellselectget, cellselectset

select TF = cellselectget(node name $, col #, row #)
cellselectset(node name $, col #, row #, select TF)

Get or set the select of any cell. If selected, the cell is inverted.
See: multiselectset, multiselectget, enabledget, enabledset, selectget, selectset






celltextalignhorget, celltextalignhorset, celltextalignhorver, celltextalignverget, celltextalignverset

align hor # = celltextalignhorget(node name $, col #, row #)
celltextalignhorset(node name $, col #, row #, align hor #)
celltextalignhorver(node name $, col #, row #, align hor #, align ver #)
align ver # = celltextalignverget(node name $, col #, row #)
celltextalignverset(node name $, col #, row #, align ver #)

Get or set the horizontal and vertical text alignment for the given cell.



celltextcolorget, celltextcolorset

text color $ = celltextcolorget(node name $, col #, row #)
celltextcolorset(node name $, col #, row #, text color $)

Get or set the text color of the cell.



cellwordwrapget, cellwordwrapset

has word wrap TF = cellwordwrapget(node name $, col #, row #)
cellwordwrapset(node name $, col #, row #, has word wrap TF)

Get or set word wrap for the given cell.





deletecol, deleterow, insertcol, insertrow

deletecol(node name $, col #)
deleterow(node name $, row #)
insertcol(node name $, after col index #)
insertrow(node name $, after row index #)

Insert and delete table rows and columns.

Inserting a row or column at index zero will be the first row or column.



enabledget, enabledset

enabled TF = enabledget(node name $)
enabledset(node name $, enabled TF)

Get or set the enabled attribute of the table. If enabled, the table inverts selected cells.
See: cellselectset, cellselectget, multiselectset, multiselectget, selectget, selectset



fillcolorget, fillcolorset

fill color $ = fillcolorget(node name $)
fillcolorset(node name $, fill color $)

Get or set the fillcolor for the table.



fillget, fillset

fill TF = fillget(node name $)
fillset(node name $, fill TF)

Get or set if the table is filled or transparent.





fullget, fullset, infoget, infoset

full $ = fullget(node name $)
fullset(node name $, full $)
info $ = infoget(node name $)
infoset(node name $, info $)

Get or set XML data that describes all the settings for this node.

The fullget and fullset routines have a header element with appropriate namespaces, infoget and infoset are an XML snippet for access as a property. Example:

mynode.info.title = "new title"



gutterget, gutterset

table gutter # = gutterget(node name $)
gutterset(node name $, table gutter #)

Set the gutter, which is a border size for the text. The gutter is inside the linesize.
See: linesizeset



handlesget, handlesset

handles TF = handlesget(node name $)
handlesset(node name $, handles TF)

Turn on or off dragable handles for reshaping the node.

This routine is used by the system tool palettes for manual positioning.
See: markersget, markersset, partget, partset



hittest, hittestall

hit info $ = hittest(node name $, hor #, ver #)
hit info $ = hittestall(node name $, hor #, ver #)

Returns an XML string with the part name, column, and row clicked on.

Part names include: none, inactive, gutter, margin, and cell.

Hittestall will also test inactive cells.



linebackcolorget, linebackcolorset

line back color $ = linebackcolorget(node name $)
linebackcolorset(node name $, line back color $)

Get or set the line back color of the line around the table.



lineforecolorget, lineforecolorset

line fore color $ = lineforecolorget(node name $)
lineforecolorset(node name $, line fore color $)

Get or set the line fore color of the line around the table.



linesizeget, linesizeset

line size # = linesizeget(node name $)
linesizeset(node name $, linesize #)

Get or set the linesize, which is the border around the table.
See: gutterset, lineforecolorset, linebackcolorset



marginget, marginset

margin between cells # = marginget(node name $)
marginset(node name $, margin between cells #)

Get or set the margin between every cell.



markersget, markersset

markers TF = markersget(node name $)
markersset(node name $, markers TF)

Turn on or off the node outline to show selection.

This routine is used by the system tool palettes to show that a node is selected.
See: handlesset, handlesget, partget, partset






maxcolget, maxcolrow, maxcolset, maxrowget, maxrowset

max col # = maxcolget(node name $)
maxcolrow(node name $, max col #, max row #)
maxcolget(node name $, max col #)
max row # = maxrowget(node name $)
maxrowget(node name $, max row #)

Get or set the total number of rows or cols in a table. new rows or cols are added to the bottom and right.



multiselectget, multiselectset

multiselect TF = multiselectget(node name $)
multiselectset(node name $, multiselect TF)

If true, multiple cells can be selected, if false, only one cell at a time can be selected.
See: cellselectset, cellselectget, enabledset, enabledget, selectget, selectset



partget, partset

part # = partget(node name $, hor #, ver #)
partset(node name $, hor #, ver #, part #)

Get or set the points for an individual handle.
See: markersget, markersset, handlesset, handlesget


reset

reset(node name $)

Resets the height and width of the table to include all cells. This is useful for scrolling.



selectcolorget, selectcolorset

select color $ = selectcolorget(node name $)
selectcolorset(node name $, select color $)

Get and set the color of the selected table cell. Use black to invert the cell.

Be sure to have some contrast between the selection color and the cell text color.



selectget, selectset

select info $ = selectget(node name $)
selectset(node name $, col #, row #)

Get or set the currently selected cell.

Selectset will select a single cell, or use a row and column of zero to deselect all cells.

If multiple cells are selected, selectget will return the first selected cell.

If no cells are selected, selectget will return an empty string.
See: enabledget, enabledset, multiselectget, multiselectset, cellselectset, cellselectget



selectnameget, selectnameset

cell name $ = selectnameget(node name $)
selectnameset(node name $, cell name $)

Get or set the currently selected cell by name.

If multiple cells are selected, selectnameget will return the first selected cell name.

If no cell is selected, selectnameget will return the empty string.

If selectnameset cannot find a cell with the given name, all cells are deselected.
See: selectset, selectget






sizecolget, sizecolrow, sizecolset, sizerowget, sizerowset

col width # = sizecolget(node name $, col #)
sizecolrow(node name $, cell width #, cell height #)
sizecolset(node name $, col #, col width #)
row height # = sizerowget(node name $, row #)
sizerowset(node name $, row #, row height #)

Get or set the height or width of any individual row or col in a table.

Sizecolrow sets the height and width of all the cells in a table at once.



styleget, styleset

style name $ = styleget(node name $)
styleset(node name $, style name $)

Get or set the syle for the table.

Available styles include: solid, shaded, beveled, double, raised, and diamond.