5.5.2.2.9. ScrollBoxLayout
ScrollBoxLayout
− a container that supports content scrolling.
Component XML-name: scrollBox
An example container description in a screen XML-descriptor:
<groupBox caption="Order" width="300" height="170">
<scrollBox width="100%" height="100%" spacing="true" margin="true">
<dateField datasource="orderDs" property="date" caption="Date"/>
<lookupField datasource="orderDs" property="customer" optionsDatasource="customersDs" caption="Customer"/>
<textField datasource="orderDs" property="amount" caption="Amount"/>
</scrollBox>
</groupBox>
-
The components placement direction can be defined by
orientation
attribute −horizontal`or `vertical
. Default isvertical
.
-
scrollBars
attribute enables configuring scroll bars. It can behorizontal
,vertical
– for horizontal and vertical scrolling respectively,both
– for scrolling in both directions. Setting the value tonone
forbids scrolling in any direction.
Warning
|
The components placed in the At the same time, |
You can use keyboard shortcuts in ScrollBox
. Set the shortcut and the action to be performed using the addShortcutAction()
method:
scrollBox.addShortcutAction(new ShortcutAction("SHIFT-A", shortcutTriggeredEvent ->
showNotification("SHIFT-A action" )));
- Attributes of scrollBox
-
align - height - id - margin - orientation - scrollBars - spacing - stylename - width
- API
-
add - addShortcutAction - getComponent - getComponentNN - getComponents - getMargin - getOwnComponent - getOwnComponents - indexOf - remove - removeAll - setMargin - setSpacing