Egret之Label属性width与textWidth的区别
module app{ export class AAA extends eui.Component{ private qqq : eui.Label = null; private mmm : eui.Label = null; public constructor(){ super(); this.skinName = "resource/eui_skins/aaa.exml"; } protected childrenCreated() : void{ super.childrenCreated(); console.log( `width : ${this.qqq.width}` ); console.log( `heigth : ${this.qqq.height}` ); console.log( `textWidth : ${this.qqq.textWidth}` ); console.log( `textHeigth : ${this.qqq.textHeight}` ); }}}
三 : 结果
可知 : width / height 指的是蓝框
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。