
CHAPTER 4: User-Interface Tools Managing control titles 101
X
Use spacing to override the default number of pixels separating the title from the graphic element. In
this example,
titleLayout is configured to place the title 15 pixels above the panel:
panel.title = 'Image format';
panel.titleLayout = { alignment: ['center', 'top'], spacing: 15 };
Title character width and justification
X To override the automatically calculated title width, define a positive non-zero value for the
characters property. This reserves enough space in the title area to hold the specified number of "X"
characters. This is useful when an element's title can change (for localized values, for instance) and you
want to reserve enough space to fit all the expected values without truncation or affecting the overall
layout.
droplist.titleLayout = { alignment: ['left', 'center'], characters: 20 };
X
When a characters value specifies a width greater than the default title width, you can set the
justify property to control how the text of the title is justified within the space reserved for it. The
value
left places the text at the left end of the space, leaving blank space on the right; right places
the text at the right end of the space, leaving blank space on the left; and
center places the text in the
middle of the space, dividing any blank space evenly on both sides of the text.
droplist.titleLayout = { alignment: ['left', 'center'],
characters: 20,
justify: 'right' };
Kommentare zu diesen Handbüchern