XUIRadiobox()

new XUIRadiobox()

Methods

GetDisabledBgColor() → {String}

获取禁用背景颜色
Returns:
String

GetDisabledBgImage() → {String}

获取禁用背景图片
Returns:
String

GetDisabledIconColor() → {String}

获取禁用图标颜色
Returns:
String

GetDisabledIconImage() → {String}

获取禁用图标图片
Returns:
String

GetDisabledTextColor() → {String}

获取禁用文字颜色
Returns:
String

GetGroupId() → {Number}

获得组Id
Returns:
Number - 组Id

GetHotBgColor() → {String}

获取高亮背景颜色
Returns:
String

GetHotBgImage() → {String}

获取高亮背景图片
Returns:
String

GetHotIconColor() → {String}

获取高亮图标颜色
Returns:
String

GetHotIconImage() → {String}

获取高亮图标图片
Returns:
String

GetHotTextColor() → {String}

获取高亮文字颜色
Returns:
String

GetIconHeight() → {Number}

获取图标高度
Returns:
Number

GetIconOffsetValue() → {Array}

获取图标位移
Returns:
Array

GetIconWidth() → {Number}

获取图标宽度
Returns:
Number

GetNormalBgColor() → {String}

获取正常背景颜色
Returns:
String

GetNormalBgImage() → {String}

获取正常背景图片
Returns:
String

GetNormalIconColor() → {String}

获取正常图标颜色
Returns:
String

GetNormalIconImage() → {String}

获取正常图标图片
Returns:
String

GetNormalTextColor() → {String}

获取正常文字颜色
Returns:
String

GetSelectedBgColor() → {String}

获取选中背景颜色
Returns:
String

GetSelectedBgImage() → {String}

获取选中背景图片
Returns:
String

GetSelectedIconColor() → {String}

获取选中图标颜色
Returns:
String

GetSelectedIconImage() → {String}

获取选中图标图片
Returns:
String

GetSelectedTextColor() → {String}

获取选中文字颜色
Returns:
String

GetText() → {String}

获取文本
Returns:
String - 文本

GetTextOffsetValue() → {Array}

获取文本位移
Returns:
Array

GetTextSize() → {Number}

获取文字大小
Returns:
Number

IsBgDrawColor() → {Boolean}

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

IsIconDrawColor() → {Boolean}

图标是否以颜色绘制
Returns:
Boolean - 是否使用颜色绘制

IsIconVisible() → {Boolean}

图标是否显示
Returns:
Boolean

IsSelected() → {Boolean}

是否选中
Returns:
Boolean - 是否选中

SetBgColor(nState, strColor)

设置背景颜色
Parameters:
Name Type Description
nState Number 状态 0: all; 1: normal; 2: hot; 3: selected; 4: disabled
strColor String 颜色

SetBgDrawColor(bDrawColor)

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

SetBgImage(nState, strPath)

设置正常状态背景图片
Parameters:
Name Type Description
nState Number 状态 0: all; 1: normal; 2: hot; 3: selected; 4: disabled
strPath ImageProp 图片地址

SetDisable(bDisabled)

设置禁用
Parameters:
Name Type Description
bDisabled Boolean
Properties:
Name Type Description
Disable Boolean false

SetDisabledBgColor(strColor)

禁用背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
DisabledBgColor Color "0x66122756"

SetDisabledBgImage(strImage)

禁用背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
DisabledBgImage ImageProp "XUIRadiobox/images/btn_bg_normal.png"

SetDisabledIconColor(strColor)

禁用图标颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
DisabledIconColor Color "0x66aa2756"

SetDisabledIconImage(strImage)

禁用图标图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
DisabledIconImage ImageProp "XUIRadiobox/images/icon_kongzhitai_normal.png"

SetDisabledTextColor(strColor)

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

SetGroupId(nId)

设置组Id
Parameters:
Name Type Description
nId Number 组Id
Properties:
Name Type Description
GroupId Number 0

SetHotBgColor(strColor)

高亮背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
HotBgColor Color "0x6600ff00"

SetHotBgImage(strImage)

高亮背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
HotBgImage ImageProp "XUIRadiobox/images/btn_bg_normal.png"

SetHotIconColor(strColor)

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

SetHotIconImage(strImage)

高亮图标图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
HotIconImage ImageProp "XUIRadiobox/images/icon_kongzhitai_normal.png"

SetHotTextColor(strColor)

高亮文字颜色
Parameters:
Name Type Description
strColor String 文字颜色
Properties:
Name Type Description
HotTextColor Color "0xff00ff00"

SetIconColor(nState, strColor)

设置正常状态图标颜色
Parameters:
Name Type Description
nState Number 状态 0: all; 1: normal; 2: hot; 3: selected; 4: disabled
strColor String 颜色

SetIconDrawColor(bDrawColor)

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

SetIconImage(nState, strPath)

设置图标图片
Parameters:
Name Type Description
nState Number 状态 0: all; 1: normal; 2: hot; 3: selected; 4: disabled
strPath String 图片地址

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 [22,22]

SetIconVisible(bVisible)

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

SetNormalBgColor(strColor)

正常背景颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
NormalBgColor Color "0x66ff0000"

SetNormalBgImage(strImage)

正常背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
NormalBgImage ImageProp "XUIRadiobox/images/btn_bg_normal.png"

SetNormalIconColor(strColor)

正常图标颜色
Parameters:
Name Type Description
strColor String 颜色
Properties:
Name Type Description
NormalIconColor Color "0xffff0000"

SetNormalIconImage(strImage)

正常图标图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
NormalIconImage ImageProp "XUIRadiobox/images/icon_kongzhitai_normal.png"

SetNormalTextColor(strColor)

正常文字颜色
Parameters:
Name Type Description
strColor String 文字颜色
Properties:
Name Type Description
NormalTextColor Color "0xffff0000"

SetSelected(bSelect)

设置选中
Parameters:
Name Type Description
bSelect Boolean 是否选中

SetSelectedBgColor(strColor)

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

SetSelectedBgImage(strImage)

选中背景图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
SelectedBgImage ImageProp "XUIRadiobox/images/btn_bg_selected.png"

SetSelectedIconColor(strColor)

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

SetSelectedIconImage(strImage)

选中图标图片
Parameters:
Name Type Description
strImage ImageProp 图片地址
Properties:
Name Type Description
SelectedIconImage ImageProp "XUIRadiobox/images/icon_kongzhitai_normal.png"

SetSelectedTextColor(strColor)

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

SetText(strText)

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

SetTextColor(nState, strColor)

设置文字颜色
Parameters:
Name Type Description
nState Number 状态 0: all; 1: normal; 2: hot; 3: selected; 4: disabled
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

SetTextVertical(bVertical)

文本竖直排列
Parameters:
Name Type Description
bVertical Boolean 是否竖直排列
Properties:
Name Type Description
TextVertical Boolean false