W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
將子組件縱向布局,并在每個(gè)子組件之間插入一根橫向的分割線。
該組件從API Version 7開始支持。后續(xù)版本如有新增內(nèi)容,則采用上角標(biāo)單獨(dú)標(biāo)記該內(nèi)容的起始版本。
名稱 | 參數(shù)類型 | 描述 |
---|---|---|
resizeable | boolean | 分割線是否可拖拽,默認(rèn)為false。 |
與RowSplit相同,ColumnSplit的分割線最小能拖動(dòng)到剛好包含子組件。
在真機(jī)中查看拖動(dòng)效果,預(yù)覽器中不支持拖動(dòng)。
不支持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) // 可拖動(dòng)
- .width('90%').height('60%')
- }.width('100%')
- }
- }
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: