Table - Maple Help

Maplets[Elements]

 Table
 encapsulate a table definition

 Calling Sequence Table(opts, element_content) Table[refID](opts, element_content)

Parameters

 opts - equation(s) of the form option=value where option is one of background, font, foreground, height, reference, tooltip, visible, or width; specify options for the Table element element_content - exactly one TableHeader element and any number of TableRow elements refID - name or string; reference to the element

Description

 • The Table window body element encapsulates a Maplet application table definition.

 Note: The table header is displayed only if the table is specified in a scroll pane, that is, a BoxCell or GridCell element with the 'vscroll' = 'as_needed' option. Otherwise, the header is not displayed. To construct a table with no header, specify a header, but do not place the table in a scroll pane.
 • The Table element features can be modified by using options.  To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.

 Elements, Symbols, or Types Assumed Option or Content list of lists content of table body list content of the table header range of positive integers height and width options, respectively refID reference option

 • A Table element must contain exactly one TableHeader element and any number of TableRow elements. A Table element can contain a Font element to specify the font option.
 • A Table element can be contained in a Maplet, BoxCell, or GridCell element, or Maplet element in a nested list representing a box layout.
 • The following table describes the control and use of the Table element options.
 An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).
 An x in the R column indicates that the option is required in the calling sequence.
 An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.
 An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.

 Option I R G S background x x x font x x foreground x x x height x x x reference x tooltip x x visible x x x width x x x

 • The opts argument can contain one or more of the following equations that set Maplet application options.
 background = color
 The default background color of the table body. This can be a recognized color name, an RGB color structure, or a string of the form "#RRGGBB" where each pair is a two-digit hexadecimal number. For selected rows, the background color is always light blue. For the table header, the background color is always gray.
 font = Font element or reference to a Font element (name or string)
 The font of the table text.
 foreground = color
 The text color for the contents in the table body. For selected rows and the table header, the foreground color is always black.
 height = posint
 The table height in pixels.  By default, this depends upon the entries in the table.
 reference = name or string
 A reference to the Table element.
 If the reference is specified by both an index, for example, Table[refID], and a reference in the calling sequence, the index reference takes precedence.
 tooltip = string or symbol
 The text that appears in the tooltip window.
 visible = true or false
 Whether the table is visible to the user.  By default, the value is true.
 width = posint
 The table width in pixels.  By default, this depends upon the entries in the table.

Examples

 > $\mathrm{with}\left(\mathrm{Maplets}\left[\mathrm{Elements}\right]\right):$
 > $\mathrm{maplet1}≔\mathrm{Maplet}\left(\left[\mathrm{BoxCell}\left(\mathrm{Table}\left(\left[A,B\right],\left[\left[1,2\right],\left[3,4\right]\right]\right),'\mathrm{as_needed}'\right),\mathrm{Button}\left("OK",\mathrm{Shutdown}\left(\right)\right)\right]\right):$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{maplet1}\right)$
 > $\mathrm{maplet2}≔\mathrm{Maplet}\left(\mathrm{GridLayout}\left(\mathrm{GridRow}\left(\mathrm{GridCell}\left(\mathrm{Table}\left(\left[A,B\right],\left[\left[1,2\right],\left[3,4\right]\right]\right),'\mathrm{as_needed}'\right)\right),\mathrm{GridRow}\left(\mathrm{GridCell}\left(\mathrm{Button}\left("OK",\mathrm{Shutdown}\left(\right)\right)\right)\right)\right)\right):$
 > $\mathrm{Maplets}\left[\mathrm{Display}\right]\left(\mathrm{maplet2}\right)$