一 : 此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 指的是蓝框