style

Type: Integer

Availability: Read or write at any time

The style property determines the type of ComboBox control and the behavior of its list box portion. The settings of the style property for ComboBox controls are listed in the following table.

ComboBox Class Constant Value Description
Style_DropDown 0 Includes a drop-down list and an edit area. The user can select from the list or type in the edit area. Accessing the text property returns the contents of the edit area, which does not have to match an entry in the combo box list.
Style_Simple 1 Includes an edit area and a list that is always displayed. The user can select a list entry or type in the edit area. The size of a simple combo box includes both the edit and list portions. By default, a simple combo box is sized so that none of the list is displayed. Increase the height property to show more of the list.
Style_DropDownList 2 This style allows only selection from the drop-down list (the default). Accessing the text property returns the text of the currently selected entry (same as itemText[listIndex]).
Style_DropDownComboList 3 This function is the same as the combo box determined by the Style_DropDown (0) constant, except that the entered text is used only to select an entry. Accessing the text property returns the currently selected list entry (same as itemText[listIndex]).
Style_SpinBox 4 This is the same as the Style_DropDownList (2) constant, except that the list box portion of the control is never displayed. Instead, the control displays a vertical scroll bar, with which the user can select the required entry.

If the style property is changed from or to Style_DropDown (1) at run time, the contents of the combo box are lost. See "ComboBox Class Constants", for details about the style constants provided by the ComboBox control.

The following guidelines assist in deciding on the setting of the style property to use for ComboBox controls.

For a Button control, the style property specifies the style of push button. The settings of the style property for Button controls are listed in the following table.

Button Class Constant Value Description
Style_Normal 0 Click to press, and pops up when button released (the default). This setting does not affect any other button.
Style_Auto2State 1 Pressing this button causes it to stay down. It also causes all other auto two-state buttons with the same parent to come up. This acts exactly the same as the OptionButton control but provides a button appearance. If there is one auto two-state button only in the group, it behaves as it does for the Style_2State (2) setting.
Style_2State 2 Pressing the button causes it to go down if it was up, or to come up if it was down. It has no impact on any other button.

For a Button control whose style property is set to Style_Auto2State (1), setting the value property to true causes other automatic two-state buttons with the same parent to come up.

Setting the value property to false has no impact on other buttons in the same group.

The settings of the style property for JadeMask controls are listed in the following table.

JadeMask Class Constant Value Description
Style_Normal 0 Click to press, and pops up when the mask control is released (the default). This setting does not affect any other mask control.
Style_Auto2State 1 Pressing this mask control causes it to go down and stay down. It also causes all other auto two-state mask controls with the same parent to come up; that is, only one mask control of a group can be down at any one time.
    This acts the same as the OptionButton control but provides a button appearance. If there is one auto two-state mask control only in the group, it behaves as it does for the Style_2State (2) setting.
Style_2State 2 Pressing the mask control causes it to go down and stay down if it was up, or to come up and stay up if it was down. It has no impact on any other mask control.
Style_Mask_Color 3 The currentMaskColor method returns the color of the pixel in the mask picture at the current mouse position. An example of the use of this style is a control that displays a map of a road network. The picture mask is built with the roads drawn in different colors and the rest of the map being some other color (for example, white).
    When the user moves the mouse over the control, the mouseMove event calls the currentMaskColor method. If the returned value is not white, the color is used to index the name of the road and this is displayed to the user in bubble help. When using this style, the roll over (pictureRollOver) and roll under (pictureRollUnder) features do not apply.

For a JadeMask control whose style property is set to Style_Auto2State (1), setting the value property to true causes other automatic two-state buttons with the same parent to come up. Setting the value property to false has no impact on other buttons in the same group.