OptionMenu


Option menu is menu where you select an alternative in a list of alternatives. The chosen
alternative is displayed in the menu component. When you click on the component, the list
of alternatives is displayed. When an alternative is chosen, the list is closed, and the
selected alternative is displayed in the component.

The option menu is connect to a database attribute of type float or int. Each alternative in
the list corresponds to an enumeration value, and when an alternative is selected, the value
is inserted into the database attribute. The component is continuously reading the value of the
databas attribute, and displays the corresponding text in the text field.

The option men can be static or dynamic. For a static meny you state the texts and
enumeration values in different items. For a dynamic meny the meny text are fetched
from a database attribute of type array of String80. The number of texts in the menu is
fetched from an attribute of type Int32, and further more you should state an attribute
that indicates that new texts should be loaded. This attribute should be of type Boolean
and the new texts are loaded when the value is changed from 0 to 1.

Attribute                               Description
OptionMenu.Type                       Type of option menu. Static or dynamic.
Static menu

OptionMenu.Attribute                       Database attribute of type Float32, Float64, Int32,
                      UInt32, Int16, UInt16, Int8 or UInt8. The value in
                      ItemEnum for a selected alternative inserted into the
                      database attribute.
OptionMenu.ItemMask                       Mask that states the number of menu alternatives.
OptionMenu.ItemText1                       Text of the first menu alternative.
OptionMenu.ItemEnum1                       Enumeration value of the first menu alternative.
OptionMenu.ItemText2                       Text of the second menu alternative.
OptionMenu.ItemEnum2                       Enumeration value of the second menu alternative.
Dynamic menu

OptionMenu.Attribute                       Database attribute of type Float32, Float64, Int32,
                      UInt32, Int16, UInt16, Int8 or UInt8. The value in
                      ItemEnum for a selected alternative inserted into the
                      database attribute.
OptionMenu.TextAttribute                       Database attribute of type array of String80. The array
                                contains the texts that are displayed in the menu.
OptionMenu.SizeAttribute                       Database attribute of type Int32. States the number of
                                alternative in the menu.
OptionMenu.UpdateAttribute                       Database attribute of type Boolean. Should be set to
                                1 when new texts are present in the TextAttribute. New
                                texts are loaded when the value is changed from 0 to 1.