DocumentTools[Components]
VolumeGauge
generate XML for a VolumeGauge Component
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
VolumeGauge( rng, opts )
rng
-
(optional) range(realcons); range of position values, defaults to 0..100
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. These statements form the Value Changed Action Component Code that executes when the VolumeGauge position is manually adjusted.
continuous : truefalse; Indicates whether dragging of the sliding component will result in continuous updates using the action code.
enabled : truefalse; Indicates whether the component is enabled. The default is true. If enabled is false then the inserted sliding component is grayed out and interaction with it cannot be initiated.
height : posint; The height in pixels of the component.
identity : {name,string}; The reference name of the component.
majorticks : numeric; The interval between the major tickmarks on the sliding component. The default is .2 times the upper value of rng minus the lower value of rng.
minorticks : numeric; The interval between the minor tickmarks on the sliding component. The default is 1/2 majorticks.
position : numeric; The initial position of the sliding component. If not specified the value of the left endpoint of the rng argument is used.
showlabels : truefalse; Indicates whether values are shown beside tickmarks. The default is true.
showticks : truefalse; Indicates whether tickmarks are shown. The default is true.
tooltip : string; The text that appears when the mouse pointer hovers over the component.
visible : truefalse; Indicates whether the component is visible. The default is true.
width : posint; The width in pixels of the component.
The VolumeGauge command in the Component Constructors package returns an XML function call which represents a VolumeGauge 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:
with⁡DocumentTools:-Components:
with⁡DocumentTools:-Layout:
Executing the VolumeGauge command produces a function call.
S≔VolumeGauge⁡identity=VolumeGauge0
S≔_XML_EC-Volume-Gauge⁡id=VolumeGauge0,lower-bound=0,upper-bound=100,control-position=0,major-tick-spacing=20,minor-ticks=10,show-labels=true,show-ticks=true,continuous-update=true,inputenabled=true,visible=true
By using commands from the Layout Constructors package a nested function call can be produced which represents a worksheet.
xml≔Worksheet⁡Group⁡Input⁡Textfield⁡S:
That XML representation of a worksheet can be inserted directly.
InsertContent⁡xml:
codestring≔\ns := true;\n\nt := false;
codestring≔ s := true; t := false;
S≔VolumeGauge⁡0...33.0,identity=VolumeGauge0,tooltip=My example VolumeGauge,showlabels,position=7.12,width=150,height=100,action=codestring:
The previous example's call to the InsertContent command inserted a component with identity "VolumeGauge0", which still exists in this worksheet. Inserting additional content whose input contains another component with that same identity "VolumeGauge0" incurs a substitution of the input identity in order to avoid a conflict with the identity of the existing component.
The return value of the following call to InsertContent is a table which can be used to reference the substituted identity of the inserted component.
lookup≔InsertContent⁡xml,output=table
lookup≔table⁡VolumeGauge0=VolumeGauge1
lookupVolumeGauge0
VolumeGauge1
GetProperty⁡lookupVolumeGauge0,value
7.12
The DocumentTools:-Components:-VolumeGauge 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