当前位置:网站首页>Column of openharmony container component
Column of openharmony container component
2022-08-09 14:18:00 【lplj717】
Column: Container for vertical layout
Column(value:{space?: Length}) //space: vertical layout element spacing, the default is 0
Column property:
1, alignItems (set the alignment format of child components in the horizontal direction)
2, justifyContent8+ (set the vertical alignment of subcomponents)
Directly above:
The code above:
@[email protected] ColumnT {build() {Column() {Text('space').fontSize(9).fontColor(0x000000).width('90%')//space: vertical layout element spacingColumn({ space: 5 }) {Text().width('100%').height(30).backgroundColor(0xAFEEEE)Text().width('100%').height(30).backgroundColor(0x00FFFF)}.width('90%').height(80).border({ width: 1 })Text('alignItems').fontSize(9).fontColor(0x000000).width('90%')//alignItems: Set the alignment format of the sub-component in the horizontal direction (properties are: Start, Center, End), the default CenterColumn({ space: 5 }) {Text().width('50%').height(30).backgroundColor(0xAFEEEE)Text().width('50%').height(30).backgroundColor(0x00FFFF)}.alignItems(HorizontalAlign.Center).width('90%').height(80).border({ width: 1 })Text('justifyContent').fontSize(9).fontColor(0x000000).width('90%')//justifyContent: Set the vertical alignment of the child componentColumn() {//Note: The space attribute cannot be added here, and the justifyContent attribute will be invalid after adding it (based on sdk8)Text().width('50%').height(30).backgroundColor(0xAFEEEE)Text().width('50%').height(30).backgroundColor(0x00FFFF)}.height('15%').border({width:1}).justifyContent(FlexAlign.End)}.width('100%').height('100%')}}
边栏推荐
猜你喜欢
随机推荐
Jetpack Compose——Modifier的基本属性简单介绍
NC192 二叉树的后序遍历
禁止输入(×),按键精灵小程序,快速上手
openharmony容器组件之Badge
【面试高频题】可逐步优化的链表高频题
openharmony容器组件之GridContainer
FFmpeg multimedia file processing (ffmpeg prints audio and video Meta information)
Jetpack Compose——remember、mutableStateOf、rememberSaveable
搭建大型分布式服务(四)Docker搭建开发环境安装Mysql
tkiner-canvas显示图片
VNet
openharmony容器组件之Column
Counter of openharmony container components
vim常用命令
Unity3d_API_GPS_LocationService
缓存和数据库一致性问题
RobotFramework 之 数据驱动
ensp如何正确配置静态路由
X264性能优化
openharmony容器组件之Row