鸿蒙(HarmonyOS)项目方舟框架(ArkUI)之ColumnSplit容器组件
一、操作环境
操作系统: Windows 10 专业版、IDE:DevEco Studio 3.1、SDK:HarmonyOS 3.1+
编辑
二、ColumnSplit组件
将子组件纵向布局,并在每个子组件之间插入一根横向的分割线。
子组件
可以包含子组件。
接口
ColumnSplit()
属性
名称 |
参数类型 |
描述 |
resizeable |
boolean |
分割线是否可拖拽,默认为false。 |
说明
与RowSplit相同,ColumnSplit的分割线最小能拖动到刚好包含子组件。
在真机中查看拖动效果,预览器中不支持拖动。
不支持clip、margin通用属性。
三、示例
代码
// xxx.ets @Entry @Component struct ColumnSplitExample { build() { Column(){ Text('The secant line can be dragged').fontSize(9).fontColor(0xCCCCCC).width('90%') ColumnSplit() { Text('1').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) Text('2').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) Text('3').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) Text('4').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) Text('5').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) } .borderWidth(1) .resizeable(true) // 可拖动 .width('90%').height('60%') }.width('100%') } }
图例
编辑
你有时间常去我家看看我在这里谢谢你啦...
我家地址:亚丁号
最后送大家一首诗:
山高路远坑深,
大军纵横驰奔,
谁敢横刀立马?
惟有点赞加关注大军。