一 : 此Label的範圍矩形框(藍框)明顯比文本實際佔用的矩形(紅框)要大
二 : 代碼如下
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 指的是藍框