618 XML to UI
Parent tag
<column>,<hbox>,<row>,<vbox>
Description
Layout tag; creates a transparent fill space used to arrange controls.
Example
The following example uses the JavaScript API to create a simple command that sends
selected values to the Output Panel. Create the files, as described in this section, and place
them in the Commands folder in your user-level configuration folder.
Create a file named Trace Selections.jsfl. Place the following code into the file and save the
file:
// Create an XML to UI dialog box using the XML definition in the
// Trace Selections.xml file
var traceSelectionsDlg = fl.getDocumentDOM().xmlPanel( fl.configURI +
"Commands/Trace Selections.xml" );
if (traceSelectionsDlg.dismiss == "accept") {
fl.trace("Checkbox 1: " + traceSelectionsDlg.checkbox1);
fl.trace("Checkbox 2: " + traceSelectionsDlg.checkbox2);
fl.trace("Checkbox 3: " + traceSelectionsDlg.checkbox3);
fl.trace("Checkbox 4: " + traceSelectionsDlg.checkbox4);
fl.trace("Checkbox 5: " + traceSelectionsDlg.checkbox5);
}
Next, create a file named Trace Selections.xml (this example does not use the <spacer/> tag,
so the second row of check box controls are aligned on the left). Place the following code into
the file and save the file:
<dialog id="traceSelections" title="Trace Selections" buttons="accept,
cancel">
<vbox>
<hbox>
<checkbox id="checkbox1" label="checkbox1"/>
<checkbox id="checkbox2" label="checkbox2"/>
<checkbox id="checkbox3" label="checkbox3"/>
</hbox>
<hbox>
<checkbox id="checkbox4" label="checkbox4"/>
<checkbox id="checkbox5" label="checkbox5"/>
</hbox>
</vbox>
</dialog>