XUICheckbox()

new XUICheckbox()

Methods

GetCheckedBgColor(nState) → {String}

获取选中状态背景色
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
Returns:
String

GetCheckedBgImage(nState) → {String}

获取选中状态背景图
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
Returns:
String

GetCheckedHotBgColor() → {String}

获取未选中高亮背景颜色
Returns:
String

GetCheckedHotBgImage() → {String}

获取高亮背景图片
Returns:
String

GetCheckedHotIconColor() → {String}

获取选中高亮图标色
Returns:
String

GetCheckedHotIconImage() → {String}

获取选中高亮图标图
Returns:
String

GetCheckedIconColor(nState) → {String}

获取选中状态图标色
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
Returns:
String

GetCheckedIconImage(nState) → {String}

获取选中状态图标
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
Returns:
String

GetCheckedNorBgColor() → {String}

获取正常背景颜色
Returns:
String

GetCheckedNorBgImage() → {String}

获取正常背景图片
Returns:
String

GetCheckedNorIconColor() → {String}

获取选中正常图标颜色
Returns:
String

GetCheckedNorIconImage() → {String}

获取选中正常图标图
Returns:
String

GetCheckedPressBgColor() → {String}

获取未选中按下背景颜色
Returns:
String

GetCheckedPressBgImage() → {String}

获取选中按下背景图
Returns:
String

GetCheckedPressIconColor() → {String}

获取选中按下图标色
Returns:
String

GetCheckedPressIconImage() → {String}

获取选中按下图标图
Returns:
String

GetDisabledTextColor() → {String}

获取禁用文字颜色
Returns:
String - 禁用文字颜色

GetIconHeight() → {Number}

获取图标高度
Returns:
Number

GetIconOffset(bHorz) → {Boolean}

获取图标位移
Parameters:
Name Type Description
bHorz Boolean 是否水平方向
Returns:
Boolean

GetIconWidth() → {Number}

获取图标宽度
Returns:
Number

GetText() → {String}

获取文本
Returns:
String - 文本

GetTextColor(nState)

获取文字颜色
Parameters:
Name Type Description
nState Number 状态 0: 未选中 1:选中 2:禁用

GetTextSize() → {Number}

获取文字大小
Returns:
Number

GetUncheckedBgColor(nState) → {String}

获取未选中正常状态背景色
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
Returns:
String

GetUncheckedBgImage(nState) → {String}

获取未选中状态背景图片
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
Returns:
String

GetUncheckedHotBgColor() → {String}

获取未选中高亮背景颜色
Returns:
String

GetUncheckedHotBgImage() → {String}

获取未选中高亮背景图片
Returns:
String

GetUncheckedHotIconColor() → {String}

获取高亮图标颜色
Returns:
String

GetUncheckedHotIconImage() → {String}

获取未选中高亮图标图片
Returns:
String

GetUncheckedIconColor(nState) → {String}

获取未选中状态图标色
Parameters:
Name Type Description
nState Number 状态 0: normal; 1: hot; 2: press
Returns:
String

GetUncheckedIconImage(nState) → {String}

获取未选中状态图标图
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
Returns:
String

GetUncheckedNorBgColor() → {String}

获取正常背景颜色
Returns:
String

GetUncheckedNorBgImage() → {String}

获取未选中正常背景图片
Returns:
String

GetUncheckedNorIconColor() → {String}

获取正常图标颜色
Returns:
String

GetUncheckedNorIconImage() → {String}

获取未选中正常图标图
Returns:
String

GetUncheckedPressBgColor() → {String}

获取未选中按下背景颜色
Returns:
String

GetUncheckedPressBgImage() → {String}

获取未选中按下背景图片
Returns:
String

GetUncheckedPressIconColor() → {String}

获取按下图标颜色
Returns:
String

GetUncheckedPressIconImage() → {String}

获取未选中按下图标图片
Returns:
String

IsBgDrawColor() → {Boolean}

背景是否以颜色绘制
Returns:
Boolean - 是否使用颜色绘制

IsCheckedState() → {Boolean}

获取选中状态
Returns:
Boolean

IsIconDrawColor() → {Boolean}

图标是否颜色绘制
Returns:
Boolean

IsIconVisible() → {Boolean}

图标是否显示
Returns:
Boolean

SetBgDrawColor(bDrawColor)

背景颜色绘制
Parameters:
Name Type Description
bDrawColor Boolean
Properties:
Name Type Description
BgDrawColor Boolean false

SetCheckedBgColor(nState, strColor)

选中状态背景色
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
strColor String 颜色

SetCheckedBgImage(nState, strPath)

选中状态背景图
Parameters:
Name Type Description
nState Number 状态 1、normal 2、hot 3、press
strPath ImageProp 图片地址

SetCheckedHotBgColor(strColor)

未选中高亮背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
CheckedHotBgColor Color "0xff1d3a76"

SetCheckedHotBgImage(strImage)

选中高亮背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
CheckedHotBgImage ImageProp "XUICheckbox/images/checkbox_bg.png"

SetCheckedHotIconColor(strColor)

选中高亮图标色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
CheckedHotIconColor Color "0xff1d3a76"

SetCheckedHotIconImage(strImage)

选中高亮图标图
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
CheckedHotIconImage ImageProp "XUICheckbox/images/checkboxon_hot.png"

SetCheckedIconColor(nState, strColor)

选中状态图标色
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
strColor String 颜色

SetCheckedIconImage(nState, strPath)

选中状态图标图
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
strPath String 图片地址

SetCheckedNorBgColor(strColor)

选中背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
CheckedNorBgColor Color "0xff0d214a"

SetCheckedNorBgImage(strImage)

选中背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
CheckedNorBgImage ImageProp "XUICheckbox/images/checkbox_bg.png"

SetCheckedNorIconColor(strColor)

选中图标颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
CheckedNorIconColor Color "0xff122756"

SetCheckedNorIconImage(strImage)

选中图标图
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
CheckedNorIconImage ImageProp "XUICheckbox/images/checkboxon_nor.png"

SetCheckedPressBgColor(strColor)

选中按下背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
CheckedPressBgColor Color "0xff1d3a76"

SetCheckedPressBgImage(strImage)

选中按下背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
CheckedPressBgImage ImageProp "XUICheckbox/images/checkbox_bg.png"

SetCheckedPressIconColor(strColor)

选中按下图标色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
CheckedPressIconColor Color "0xff1d3a76"

SetCheckedPressIconImage(strImage)

选中按下图标图
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
CheckedPressIconImage ImageProp "XUICheckbox/images/checkboxon_pre.png"

SetCheckedState(bChecked)

设置选中状态
Parameters:
Name Type Description
bChecked Boolean 选中状态

SetCheckedTextColor(strColor)

选中文字颜色
Parameters:
Name Type Description
strColor String 文字颜色
Properties:
Name Type Description
CheckedTextColor Color "0xffffffff"

SetDisabledTextColor(strColor)

禁用文字颜色
Parameters:
Name Type Description
strColor String 文字颜色
Properties:
Name Type Description
DisabledTextColor Color "0xffffffff"

SetIconDrawColor(bDrawColor)

图标颜色绘制
Parameters:
Name Type Description
bDrawColor Boolean 颜色
Properties:
Name Type Description
IconDrawColor Boolean false

SetIconOffsetValue(nHorValue, nVerValue)

图标位移
Parameters:
Name Type Description
nHorValue Number 水平位移
nVerValue Number 竖直位移
Properties:
Name Type Description
IconOffsetValue Collection [-1,-1]

SetIconSize(nWidth, nHeight)

图标大小
Parameters:
Name Type Description
nWidth Number 宽度
nHeight Number 高度
Properties:
Name Type Description
IconSize Collection [20,20]

SetIconVisible(bVisible)

显示图标
Parameters:
Name Type Description
bVisible Boolean 是否显示
Properties:
Name Type Description
IconVisible Boolean true

SetText(strText)

文字
Parameters:
Name Type Description
strText String 文本内容
Properties:
Name Type Description
Text String "XUICheckbox"

SetTextColor(nState, strColor)

文字颜色
Parameters:
Name Type Description
nState Number 状态 0: 未选中 1:选中 2:禁用
strColor String 文字颜色

SetTextOffsetValue(nHorValue, nVerValue)

文本位移
Parameters:
Name Type Description
nHorValue Number 水平位移
nVerValue Number 竖直位移
Properties:
Name Type Description
TextOffValue Collection [-1,-1]

SetTextSize(nFontSize)

文字大小
Parameters:
Name Type Description
nFontSize Number 文字大小
Properties:
Name Type Description
TextSize Number 20

SetUncheckedBgColor(nState, strColor)

未选中状态背景色
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
strColor String 颜色

SetUncheckedBgImage(nState, strPath)

未选中状态背景图片
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
strPath String 图片地址

SetUncheckedHotBgColor(strColor)

未选中高亮背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
UncheckedHotBgColor Color "0xff1d3a76"

SetUncheckedHotBgImage(strImage)

未选中高亮背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
UncheckedHotBgImage ImageProp "XUICheckbox/images/checkbox_bg.png"

SetUncheckedHotIconColor(strColor)

高亮图标颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
UncheckedHotIconColor Color "0xff1d3a76"

SetUncheckedHotIconImage(strImage)

未选中高亮图标图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
UncheckedHotIconImage ImageProp "XUICheckbox/images/checkboxoff_hot.png"

SetUncheckedIconColor(nState, strColor)

未选中状态图标色
Parameters:
Name Type Description
nState Number 0: normal; 1: hot; 2: press
strColor String 颜色

SetUncheckedIconImage(nState, strPath)

未选中状态图标图
Parameters:
Name Type Description
nState Number 状态 0、normal 1、hot 2、press
strPath String 图片地址

SetUncheckedNorBgColor(strColor)

未选中背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
UncheckedNorBgColor Color "0xff122756"

SetUncheckedNorBgImage(strImage)

未选中背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
UncheckedNorBgImage ImageProp "XUICheckbox/images/checkbox_bg.png"

SetUncheckedNorIconColor(strColor)

未选中正常图标颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
UncheckedNorIconColor Color "0xff122756"

SetUncheckedNorIconImage(strImage)

未选中正常图标图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
UncheckedNorIconImage ImageProp "XUICheckbox/images/checkboxoff_nor.png"

SetUncheckedPressBgColor(strColor)

未选中按下背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
UncheckedPressBgColor Color "0xff1d3a76"

SetUncheckedPressBgImage(strImage)

未选中按下背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
UncheckedPressBgImage ImageProp "XUICheckbox/images/checkbox_bg.png"

SetUncheckedPressIconColor(strColor)

按下图标颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
UncheckedPressIconColor Color "0xff1d3a76"

SetUncheckedPressIconImage(strImage)

未选中按下图标图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
UncheckedPressIconImage ImageProp "XUICheckbox/images/checkboxoff_pre.png"

SetUncheckedTextColor(strColor)

未选中正常文字颜色
Parameters:
Name Type Description
strColor String 文字颜色
Properties:
Name Type Description
UncheckedTextColor Color "0xffffffff"