Class “Row”
Object > NativeObject > Widget > Composite > Row
A composite with the layout property initialized with a RowLayout. All children are automatically arranged in one horizontal row, starting from the left.
| Type: | Row extends Composite |
| Constructor: | public |
| Singleton: | No |
| Namespace: | tabris |
| Direct subclasses: | None |
| JSX Support: | Element: <Row/>Parent Elements: <Canvas/>, <Cell/>, <Composite/>, <Page/>, <RefreshComposite/>, <Row/>, <ScrollView/>, <Stack/>, <Tab/>Child Elements: Any standalone widget element |
Examples
JavaScript
import {Row, contentView, TextView} from 'tabris';
const row = new Row({
layoutData: 'stretch',
spacing: 16
}).appendTo(contentView);
row.append(
new TextView({text: 'one'}),
new TextView({text: 'two'}),
new TextView({text: 'three'})
);
See also:
JSX Creating a simple Row
JSX Creating a Row with vertical alignment
JSX Creating a Row with horizontal alignment
Constructor
new Row(properties?)
| Parameter | Type | Description |
|---|---|---|
| properties | Properties<Row> |
Sets all key-value pairs in the properties object as widget properties. Optional. |
Properties
alignment
Determines the vertical placement of the children. For the stretchY value to work correctly the Row needs to be given a height either by setting height or by setting top and bottom.
| Type: | 'top' |
| Default: | 'top' |
| Settable: | By Constructor or JSX |
| Change Event: | Not supported |
This property can only be set via constructor or JSX. Once set, it cannot change anymore.
See also:
layout
The row layout manager responsible for interpreting the layoutData of the child widgets of this Composite.
| Type: | RowLayout |
| Default: | RowLayout |
| Settable: | By Constructor or JSX |
| Change Event: | Not supported |
This property can only be set via constructor or JSX. Once set, it cannot change anymore.
spacing
The space between the children in device independent pixel.
| Type: | number |
| Default: | 0 |
| Settable: | By Constructor or JSX |
| Change Event: | Not supported |
This property can only be set via constructor or JSX. Once set, it cannot change anymore.