ts-container-rowsplit.md 1.6 KB
Newer Older
Z
zengyawen 已提交
1
# RowSplit
Z
zengyawen 已提交
2

Z
zengyawen 已提交
3

4
> **NOTE**<br>
Z
zengyawen 已提交
5
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
Z
zengyawen 已提交
6

Z
zengyawen 已提交
7

8
The **<RowSplit\>** lays out child components horizontally and inserts a vertical divider between every two child components.
Z
zengyawen 已提交
9 10 11


## Required Permissions
Z
zengyawen 已提交
12 13 14

None

Z
zengyawen 已提交
15 16

## Child Components
Z
zengyawen 已提交
17 18 19 20

This component can contain child components.


Z
zengyawen 已提交
21
## APIs
Z
zengyawen 已提交
22

Z
zengyawen 已提交
23
RowSplit()
Z
zengyawen 已提交
24 25


Z
zengyawen 已提交
26
## Attributes
Z
zengyawen 已提交
27

E
ester.zhou 已提交
28
| Name | Type | Description |
Z
zengyawen 已提交
29
| -------- | -------- | -------- |
30
| resizeable | boolean | Whether the divider is draggable. The default value is **false**. |
Z
zengyawen 已提交
31

32 33
> **NOTE**<br>
> Similar to **<RowSplit\>**, the divider of **<RowSplit\>** can be dragged to a position that just fully holds a component.
Z
zengyawen 已提交
34 35 36 37


## Example

E
ester.zhou 已提交
38

Z
zengyawen 已提交
39 40 41 42 43 44
```
@Entry
@Component
struct RowSplitExample {
  build() {
    Column() {
E
ester.zhou 已提交
45
      Text('The second line can be dragged').fontSize(9).fontColor(0xCCCCCC).width('90%')
Z
zengyawen 已提交
46 47 48 49 50 51 52 53 54 55 56 57 58 59
      RowSplit() {
        Text('1').width('10%').height(100).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
        Text('2').width('10%').height(100).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
        Text('3').width('10%').height(100).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
        Text('4').width('10%').height(100).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
        Text('5').width('10%').height(100).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
      }
      .resizeable(true) // The divider can be dragged.
      .width('90%').height(100)
    }.width('100%').margin({ top: 5 })
  }
}
```

Z
zengyawen 已提交
60
![en-us_image_0000001212058482](figures/en-us_image_0000001212058482.gif)