User:Jcreer/SMS:DMI Combo Box Elements

From XMS Wiki
Jump to navigationJump to search


Elements

Element <combo_box>
Info

Widget that displays list of options. Only 1 can be selected. If no default is specified and the optional tag is present, then an empty option will be added to the combo box. If there is no default tag, and no optional tag, then the first item will be default.

In version 2, if a combo box has display_options_arc, and is part of a dialog that is used as an arc attribute, then a limited set of display options will appear for the options of the combo box. The display option for each option of the combo box will only be line thickness and color. The display option is NOT saved at any point and will be reset every time SMS is opened.

Versions 1, 2
Attributes default, unique_name, optional
Children option, dependency, text_style, display_options_arc
Used by item, row, column
Example Creates a combo box with hours, minutes and seconds. Hours is the default item.
<combo_box>
   <unique_name>cbxTransportUnits</unique_name>                	
   <option>
      <text>hours</text>
      <default></default>
   </option>
   <option>
      <text>minutes</text>
	</option>
	<option>
      <text>seconds</text>
   </option>
   <dependency>…</dependency>…
</ combo_box >

Attribtutes

Attribute @ <default>
Info

Sets the initial default value of a widget. Can also be used to state the default combo-box option.

Values

edit_box or any element that begins with “custom_control”:

  • double

check_box:

  • checked
  • unchecked

combo_box:

  • no values or empty string

export_optional:

  • true
  • false
Version 1
Used by

edit_box, check_box, option, any element that begins with “control” (“custom_control” in version 1), combo_box, export_optional

Attribute @ <optional>
Info

Placed inside widgets to suppress a warning message from being displayed if the widgets data is empty. By default, data associated with a widget is required. If the <optional> tag is included and the widget’s data is empty, a warning message won’t be displayed.

Values none
Version 2
Used by text_box, combo_box, edit_box, table, any element that starts with “custom_control”, check_box, column, row
Attribute @ <unique_name>
Info

A unique name given to an widget, which determines how to reference the widget. This is needed if the widget is being used as a dependency (parent), or if the widget value is being exported. When a unique_name is being referenced it should be by the file (nothing if current file), then unique_name. No spaces or punctuation (except _) are allowed in the name. The name must contain at least 1 non-numeric letter. The name must be unique. Names are not case sensitive, hence “aaa” is the same as “AAA”.

Values string (unique)
Version 1
Used by card, text_box, combo_box, edit_box, table, all elements starting with “custom_control”, check_box, text_box, control_curve