DocumentTools[Components]
DataTable
generate XML for a DataTable Component
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
DataTable( opts )
opts
-
(optional); one or more keyword options as described below
action : string; A string which parses to one or more valid statements in 1-D Maple Notation.
identity : {name,string}; The reference name of the component.
columnheader : truefalse; Specifies whether column names will be shown. The default is false.
columnnames : list({scalar,string}); A list of headers for each column.
columnwidths : list(posint); A list of positive integers specifying the width in pixels of the columns.
enabled : truefalse; Specifies whether the component is enabled. The default is true. If enabled is false then an inserted DataTable will not receive updates when the associated Matrix or Vector changes.
editable : truefalse; Specifies whether component entries can be edited. The default is true.
rowheader : truefalse; Show the row names. The default is true.
rownames : list({scalar,string}); A list of headers for each row.
tooltip : string; The text that appears when the mouse pointer hovers over the DataTable.
variable : name; The name of the associated Matrix or Array.
visible : truefalse; Specifies whether the component is visible. The default is true.
visiblerows : posint; The number of rows that are displayed.
visiblecolumns : posint; The number of columns that are displayed.
The DataTable command in the Component Constructors package returns an XML function call which represents a DataTable Component.
The generated XML can be used with the results of commands in the Layout Constructors package to create an entire Worksheet or Document in XML form. Such a representation of a Worksheet or Document can be inserted into the current document using the InsertContent command.
with⁡DocumentTools:-Components:
with⁡DocumentTools:-Layout:
M≔Matrix⁡3,3,1,3,2.7,5,π,sin⁡x,a,b,1.03
M≔
Executing the DataTable command produces a function call.
DT≔DataTable⁡identity=DataTable0,variable=M
DT≔_XML_EC-RTableBrowser⁡id=DataTable0,columnheader=false,editable=true,enabled=true,handle=36893628273876721780,rowheader=false,variable=M,visible=true,visiblecolumns=3,visiblerows=3
By using commands from the DocumentTools:-Layout package a nested function call can be produced which represents a worksheet.
xml≔Worksheet⁡Group⁡Input⁡Textfield⁡DT:
That XML representation of a worksheet can be inserted directly.
DocumentTools:-InsertContent⁡xml:
DT≔DataTable⁡identity=DataTable0,variable=M,rowheader,columnheader,columnnames=A,Col. B,3,columnwidths=25,50,100,rownames=x,y,z,tooltip=my data table:
The action code associated with the Data Table Component may be viewed or edited by selecting the Data Table and clicking Edit Content Changed Code in the Content Panel. If the enabled property of the DataTable Component is set then that action code is executed whenever its entries are changed manually. Note that assigning to an entry of the associated Vector/Matrix/Array will not cause execution of the action code.
The DocumentTools[Components][DataTable] command was introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
See Also
Component Code
Component Constructors
DocumentTools
Embedded Components
XMLTools
Download Help Document