• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ColumnSplit
2
3The **\<ColumnSplit>** component lays out child components vertically and inserts a horizontal divider between every two child components.
4
5>  **NOTE**
6>
7> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
8
9
10
11## Child Components
12
13Supported
14
15
16## APIs
17
18ColumnSplit()
19
20
21## Attributes
22
23| Name| Type| Description|
24| -------- | -------- | -------- |
25| resizeable | boolean | Whether the divider can be dragged. The default value is **false**.|
26
27>  **NOTE**
28>
29> Similar to **\<RowSplit>**, the divider of **\<ColumnSplit>** can be dragged to a position that just fully holds a component.
30>
31> Dragging is not supported in the Previewer. Check the drag effect on a real device.
32
33## Example
34
35```ts
36// xxx.ets
37@Entry
38@Component
39struct ColumnSplitExample {
40  build() {
41    Column(){
42      Text('The secant line can be dragged').fontSize(9).fontColor(0xCCCCCC).width('90%')
43      ColumnSplit() {
44        Text('1').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
45        Text('2').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
46        Text('3').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
47        Text('4').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
48        Text('5').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
49      }
50      .borderWidth(1)
51      .resizeable(true) // The divider can be dragged.
52      .width('90%').height('60%')
53    }.width('100%')
54  }
55}
56```
57
58![en-us_image_0000001219982708](figures/en-us_image_0000001219982708.gif)
59