new XUILabel()
Methods
-
GetBgColor() → {String}
-
获取背景颜色
Returns:
String - 背景颜色 -
GetBgImage() → {String}
-
获取背景图片
Returns:
String - 背景图片 -
GetBorderColor() → {String}
-
获取边框颜色
Returns:
String -
GetBorderRadius() → {Number}
-
获取边框圆角
Returns:
Number -
GetBorderType() → {String}
-
获取边框类型
Returns:
String -
GetBorderWidth() → {Number}
-
获取边框线宽
Returns:
Number -
GetFontFamily() → {String}
-
获取字体系列
Returns:
String - strFontFamily "微软雅黑" -
GetPrecision() → {Number}
-
获取科学计数精度
Returns:
Number - 精度 -
GetText() → {String}
-
获取文本
Returns:
String - strText 文本内容 -
GetTextColor() → {String}
-
获取文本颜色
Returns:
String - 文字颜色 -
GetTextSize() → {Number}
-
获取文本字体大小
Returns:
Number - nFontSize 文字大小 -
IgnoreEvents(bIgnore)
-
穿透鼠标事件
Parameters:
Name Type Description bIgnore
Boolean 穿透鼠标事件 Properties:
Name Type Description IgnoreEvents
Boolean false -
IsAutoReturn() → {Boolean}
-
是否换行
Returns:
Boolean - 是否换行 -
IsDrawColor() → {Boolean}
-
是否使用颜色绘制
Returns:
Boolean - 是否使用颜色绘制 -
IsShowBorder() → {Boolean}
-
是否显示边框
Returns:
Boolean -
IsShowExponent() → {Boolean}
-
是否指数显示
Returns:
Boolean - 指数显示 -
IsShowPower() → {Boolean}
-
是否幂数显示
Returns:
Boolean - 幂数显示 -
SetAutoReturn(bAutoReturn)
-
是否换行
Parameters:
Name Type Description bAutoReturn
Boolean 是否换行 Properties:
Name Type Description AutoReturn
Boolean false -
SetBgColor(strColor)
-
背景颜色
Parameters:
Name Type Description strColor
String 背景颜色 Properties:
Name Type Description BgColor
Color "0xffff0000" -
SetBgImage(strImage)
-
背景图片
Parameters:
Name Type Description strImage
ImageProp Properties:
Name Type Description BgImage
ImageProp "XUILabel/images/red.png" -
SetBorderColor(strColor)
-
边框颜色
Parameters:
Name Type Description strColor
String Properties:
Name Type Description BorderColor
Color "0xffff0000" -
SetBorderRadius(nRadius)
-
边框圆角
Parameters:
Name Type Description nRadius
Number Properties:
Name Type Description BorderRadius
Number 0 -
SetBorderType(strType)
-
边框类型
Parameters:
Name Type Description strType
String Properties:
Name Type Description BorderType
Combo ["solid","dashed","dotted"] -
SetBorderWidth(nWidth)
-
边框线宽
Parameters:
Name Type Description nWidth
Number Properties:
Name Type Description BorderWidth
Number 1 -
SetCursor(cursor)
-
鼠标样式
Parameters:
Name Type Description cursor
String 穿透鼠标事件 Properties:
Name Type Description Cursor
Combo ["defult","pointer"] -
SetDrawColor(bDrawColor)
-
使用颜色绘制
Parameters:
Name Type Description bDrawColor
Boolean 使用颜色绘制 Properties:
Name Type Description DrawColor
Boolean false -
SetFontFamily(strFontFamily)
-
字体系列
Parameters:
Name Type Description strFontFamily
String Properties:
Name Type Description FontFamily
String "微软雅黑" -
SetPrecision(nPrecision)
-
科学计数显示精度,纯数字文本有效
Parameters:
Name Type Description nPrecision
Number 科学计数显示精度 Properties:
Name Type Description nPrecision
Number 3 -
SetShowExponent(bExponent)
-
指数显示,纯数字文本有效
Parameters:
Name Type Description bExponent
Boolean 是否指数显示 Properties:
Name Type Description bExponent
Boolean false -
SetShowPower(bPower)
-
幂数显示,纯数字文本有效
Parameters:
Name Type Description bPower
Boolean 是否幂数显示 Properties:
Name Type Description bPower
Boolean false -
SetText(strText)
-
文本
Parameters:
Name Type Description strText
String 文本内容 Properties:
Name Type Description Text
String "Label" -
SetTextColor(strColor)
-
文本颜色
Parameters:
Name Type Description strColor
String 文字颜色 Properties:
Name Type Description TextColor
Color "0xff000000" -
SetTextHorAlign(strAlign)
-
水平对齐方式
Parameters:
Name Type Description strAlign
String Properties:
Name Type Description HorAlign
Combo ["center","left","right"] -
SetTextSize(nFontSize)
-
文本大小
Parameters:
Name Type Description nFontSize
Number 文字大小 Properties:
Name Type Description TextSize
Number 20 -
SetTextVerAlign(strAlign)
-
竖直对齐方式
Parameters:
Name Type Description strAlign
String Properties:
Name Type Description VerAlign
Combo ["middle","top","bottom"] -
ShowBorder(bShowBorder)
-
显示边框
Parameters:
Name Type Description bShowBorder
Boolean 是否显示边框 Properties:
Name Type Description ShowBorder
Boolean false