The oxy_combobox built-in form control is used for providing a
graphical user interface object that is a drop-down menu of proposed values. This form control
can also be used for a combination of a drop-down menu and an editable single-line text
field.
The
oxy_combobox form control supports the following properties:
-
edit - Lets you edit the value of an
attribute, the text content of an element, or Processing Instructions (PI). This property
can have the following values:
- columns - Controls the width of the form
control. The unit size is the width of the w character.
- width - Specifies the width of the content area
using relative (em, ex), absolute (in,
cm, mm, pt, pc,
px), and percentage (followed by the % character)
length units. The width property takes precedence over the
columns property (if the two are used together).
- visible - Specifies whether or not the form
control is visible. The possible values of this property are true
(default value) and false.
- editable - This property accepts the true and
false values. In addition to a drop-down menu, the
true value also generates an editable text field box that allows
you to insert other values than the proposed ones. The false value
generates a drop-down menu that only accepts the proposed values.
- tooltips - Associates tooltips to each value in
the values property. The value of this property is a list of tooltips
separated by commas. If you want the tooltip to display a comma, use the
${comma} variable.
- values - Specifies the values that populate the
content completion list of proposals. If these values are not specified in the CSS, they
are collected from the associated XML Schema..
- fontInherit - This value specifies whether
the form control inherits its font from its parent element. The values of this property
can be true or false (default value). To make the form
control inherit its font from its parent element, set the fontInherit
property to true.
- labels - This property must have the same number
of items as the values property. Each item provides a literal description
of the items listed in the values property.
Note: This property is only available for read-only combo boxes (the
editable property is set to false).
- color - Specifies the foreground color of the form
control. If the value of the color property is inherit,
the form control has the same color as the element in which it is inserted.
- hoverPseudoclassName - Allows you to change the
way an element is rendered when you hover over a form control. The value is the name of a
CSS pseudo-class. When you hover over the form control, the specified pseudo-class will be
set on the element that contains the form control.
p:before {
content: oxy_combobox(hoverPseudoclassName, 'showBorder')
}
p:showBorder {
border: 1px solid red;
}
Combo Box Form Control
comboBox:before {
content: "A combo box that edits an attribute value. The possible values are provided from CSS:"
oxy_combobox(
edit, "@attribute",
editable, true,
values, "value1, value2, value3",
labels, "Value no1, Value no2, Value no3");
}
Note: You can use the
Content Completion
Assistant in the CSS or LESS editor to easily insert a sample of the form
control by selecting the corresponding code template. The form control code templates are
displayed with a

symbol in the content complete list.
Tip: To insert a sample of the
oxy_combobox form control, invoke
the
Content Completion Assistant by pressing
Ctrl Space (Command Space on OS
X) and select
the
oxy_combobox code template.