
CHAPTER 4: User-Interface Tools Control objects 141
titleLayout
Object For a DropDownList, FlashPlayer, IconButton, Image, or TabbedPanel
with a
title value, the way the text label is shown in relation to the
element. A JavaScript object with these properties:
alignment —The position of the title relative to the element, an
array of [horizontal_alignment, vertical_alignment]. For possible
alignment values, see “
alignment” on page 116. Note that fill is
not a valid alignment value for either horizontal or vertical
alignment in this context.
characters — A number; if 1 or greater, reserves a title width
wide enough to hold the specified number of "X" characters in
the font for this element. If 0, the title width is calculated based
on the value of the
title property during layout operations.
spacing — A number; 0 or greater. The number of pixels
separating the title from the element.
margins — An array of numbers, [left, top, right, bottom]
for the number of pixels separating each edge of an element and
the visible content within that element. This overrides the default
margins.
justify — One of 'left', 'center', or 'right', how to justify
the text when the space allocated for the title width is greater
than the actual width of the text.
truncate — If 'middle ' or 'end', defines where to remove
characters from the text and replace them with an ellipsis (...) if
the specified title does not fit within the space reserved for it. If
'none', and the text does not fit, characters are removed from
the end, without any replacement ellipsis character.
type
String Contains the type name of the element, as specified on creation.
X For Window objects, one of the type names window, palette, or
dialog.
X For controls, the type of the control, as specified in the add
method that created it.
Read only.
value
Boolean For a Checkbox or RadioButton, true if the control is in the selected or
set state, false if it is not.
value
Number For a Scrollbar or Slider, the current position of the indicator. If set to a
value outside the range specified by
minvalue and maxvalue, it is
automatically reset to the closest boundary.
visible
Boolean When true, the element is shown, when false it is hidden.
When a container is hidden, its children are also hidden, but they
retain their own visibility values, and are shown or hidden accordingly
when the parent is next shown.
Comentarios a estos manuales