An easy-to-use structured dialog box that requests input from the end-user.
<DialogBox></DialogBox>
- Note
- Dialog returns the intristic variable __dlg_result.
If the user pressed Cancel: __dlg_result="false"
If the user pressed OK: __dlg_result="true"
Attributes in the DIALOGBOX array
| Description |
| title | Display name of Dialog box. Default: "" |
| width | Width (in pixels) of Dialog box. Default: "328" |
| height | Height (in pixels) of Dialog box. Default: "200" |
| columnWidth | Name Column width (in pixels). Default: "150" |
| help_url | Optional URl to search for help. Default: "" |
| show_buttons | Show/hide bottom row of buttons (Help, OK and Cancel). Default: "true" |
DLGITEM Dialog Item(s)
- Note
- Each Dialog Item is a Name/Value pair, that may be edited by the end-user.
-
All dialog Items share the same width (similiar to a properties modal)
-
All dialog Items are appended below (the previous defined dialog Item)
-
Over 60 different pre-configured dialog item-types are included. See Dialog Box - Item Types
-
Unimited dialog items may be added to a dialog box
| Description |
| name | Display name of Dialog item. Cannot be empty string: "" |
| value | Assign the default value for the dialog item. Default: "" |
| type | Choose one of the availble dialog item types. |
| columnWidth | Name Column width (in pixels). Default: "150" |
| help_url | Optional URl to search for help. Default: "" |
| show_buttons | Show/hide bottom row of buttons (Help, OK and Cancel). Default: "true" |
XML example:
<DIALOGBOX title="My Sample Dialog box..." width="300" height="400" columnWidth="200" help_url="">
<DLGITEM name="Enter Your Name" value="first_global" type="edit" />
<DLGITEM name="Check or Uncheck" value="true" type="check" />
<DLGITEM name="Choose an option" value="third_global" type="combo">
<OPTION>First Option</OPTION>
<OPTION>Second Option</OPTION>
<OPTION>Third Option</OPTION>
<OPTION>Fourth Option</OPTION>
</DLGITEM>
</DIALOGBOX>
XML example:
<!-- Add Modal dialog -->
<DIALOGBOX title="Generate Silkscreen (from Components)..." width="400" height="200" columnWidth="180" help_url="">
<DLGITEM name="Choose Side(s)" value="@component_side" type="combo">
<OPTION>Top and Bottom</OPTION>
<OPTION>Top only</OPTION>
<OPTION>Bottom only</OPTION>
</DLGITEM>
<DLGITEM name="RefDes Height (mm.)" value="@refdes_height" type="edit" />
<DLGITEM name="RefDes Font" value="@refdes_font" type="edit" />
<DLGITEM name="Add Component Outline" value="@comp_outline" type="check" />
<DLGITEM name="Line Width" value="@line_width" type="check" />
</DIALOGBOX>
<EXIT if="__dlg_result==false"></EXIT>