new XUIComboBox()
Methods
-
AppendItem(strText, nUuID)
-
添加item项
Parameters:
Name Type Description strText
String item项文本 nUuID
Number item项数据 -
GetBgBorderColor() → {String}
-
获取背景边框颜色
Returns:
String - 背景边框颜色 -
GetBgBorderSize() → {Number}
-
获取背景边框宽度
Returns:
Number - 背景边框宽度 -
GetBgColor() → {String}
-
获取背景颜色
Returns:
String - 背景颜色 -
GetBgImage() → {String}
-
获取背景图片
Returns:
String - 背景图片路径 -
GetBtnHeight() → {Number}
-
获取按钮高度
Returns:
Number -
GetBtnHorValue() → {Number}
-
获取按钮水平偏移
Returns:
Number -
GetBtnImg() → {String}
-
获取按钮图片
Returns:
String -
GetBtnWidth() → {Number}
-
获取按钮宽度
Returns:
Number -
GetItemHeight() → {Number}
-
获取下拉框item项高度
Returns:
Number - nHeight -
GetItemHotColor() → {String}
-
获取item项高亮颜色
Returns:
String -
GetItemHotTextFontColor() → {String}
-
获取item项高亮文本颜色
Returns:
String -
GetItemNorColor() → {String}
-
获取item项正常颜色
Returns:
String -
GetItemNorTextFontColor() → {String}
-
获取item项正常文本颜色
Returns:
String -
GetItemSelectedColor() → {String}
-
获取item项选中颜色
Returns:
String -
GetItemSelectTextFontColor() → {String}
-
获取item项选中文本颜色
Returns:
String -
GetOptionBgColor() → {String}
-
获取下拉框选项背景颜色
Returns:
String -
GetOptionBgImg() → {String}
-
获取下拉框选项背景图片
Returns:
String -
GetOptionBorderColor() → {String}
-
获取下拉框选项边框颜色
Returns:
String -
GetOptionBorderSize() → {Number}
-
获取下拉框选项边框宽度
Returns:
Number -
GetOptionFontSize() → {Number}
-
获取选项文本大小
Returns:
Number -
GetOptionTextHorAlign() → {String}
-
获取选项文本水平布局
Returns:
String -
GetOptionTextPosition() → {Array}
-
获取选项文本位置
Returns:
Array -
GetOptionTextVerAlign() → {String}
-
获取选项文本竖直布局
Returns:
String -
GetSelectedItemIndex() → {Number}
-
获取选中项索引
Returns:
Number -
GetSelectedItemText() → {String}
-
获取选中项文本
Returns:
String -
GetSelectedItemUuID() → {Number}
-
获取选中项的UuID
Returns:
Number -
GetSelectedTextColor() → {String}
-
获取当前字体颜色
Returns:
String - 当前字体颜色 -
GetSelectedTextSize() → {Number}
-
获取当前字体大小
Returns:
Number - 当前字体大小 -
GetSelectedTextXPosition() → {Number}
-
获取当前文本x方向位置
Returns:
Number - 左偏移 -
GetSelectedTextYPosition() → {Number}
-
获取当前文本y方向位置
Returns:
Number - 上偏移 -
InsertItem(nIndex, strText, nUuID)
-
插入item项
Parameters:
Name Type Description nIndex
Number 索引 strText
String item项文本 nUuID
Number item项数据 -
IsBgDrawColor() → {Boolean}
-
背景是否以颜色绘制
Returns:
Boolean - 是否颜色绘制 -
IsBtnVisible() → {Boolean}
-
按钮是否可见
Returns:
Boolean -
IsOptionBgDrawColor() → {Boolean}
-
下拉框选项背景是否颜色绘制
Returns:
Boolean -
RemoveAllItems()
-
删除所有item项
-
RemoveItemByIndex(nIndex)
-
根据Index删除item项
Parameters:
Name Type Description nIndex
Number 索引 -
SelecteItemByIndex(nIndex)
-
当前选中索引
Parameters:
Name Type Description nIndex
Number 索引 -
SelecteItemByText(strText)
-
当前选中文本
Parameters:
Name Type Description strText
String item项文本 -
SetBgBorderColor(strColor)
-
背景边框颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description BgBorderColor
Color "0xff000000" -
SetBgBorderSize(nSize)
-
背景边框宽度
Parameters:
Name Type Description nSize
Number 边框宽度 Properties:
Name Type Description BgBorderSize
Number 1 -
SetBgColor(strColor)
-
背景颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description BgColor
Color "0xffffffff" -
SetBgDrawColor(bDrawColor)
-
背景是否以颜色绘制
Parameters:
Name Type Description bDrawColor
Boolean 是否颜色绘制 Properties:
Name Type Description BgDrawColor
Boolean false -
SetBgImage(strPath)
-
背景图片
Parameters:
Name Type Description strPath
ImageProp 图片路径 Properties:
Name Type Description BgImage
ImageProp "" -
SetBtnHorValue(nXPos)
-
按钮水平偏移
Parameters:
Name Type Description nXPos
Number 距右边距 Properties:
Name Type Description BtnPosition
Number 0 -
SetBtnImg(strPath)
-
按钮图片
Parameters:
Name Type Description strPath
ImageProp Properties:
Name Type Description BtnImg
ImageProp "common_2dNative/XUIComboBox/images/xiala.png" -
SetBtnSize(nWidth, nHeight)
-
按钮大小
Parameters:
Name Type Description nWidth
Number 宽度 nHeight
Number 高度 Properties:
Name Type Description BtnSize
Collection [20,100] -
SetBtnVisible(bVisible)
-
按钮是否可见
Parameters:
Name Type Description bVisible
Boolean Properties:
Name Type Description BtnVisible
Boolean true -
SetItemHeight(nHeight)
-
下拉框item项高度
Parameters:
Name Type Description nHeight
Number Properties:
Name Type Description ItemHeight
Number 30 -
SetItemHotColor(strColor)
-
item项高亮颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description ItemHotColor
Color "0xff595a5d" -
SetItemHotTextFontColor(strColor)
-
item项高亮文本颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description ItemHotTextFontColor
Color "0xffffffff" -
SetItemNorColor(strColor)
-
item项正常颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description ItemNorColor
Color "0xff4c4c4f" -
SetItemNorTextFontColor(strColor)
-
item项正常文本颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description ItemNorTextFontColor
Color "0xffffffff" -
SetItemSelectedColor(strColor)
-
item项选中颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description ItemSelectedColor
Color "0xff3c3c3c" -
SetItemSelectTextFontColor(strColor)
-
item项选中文本颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description ItemSelectTextFontColor
Color "0xffffffff" -
SetItemTextByIndex(nIndex, strText)
-
修改item项文本
Parameters:
Name Type Description nIndex
Number 索引 strText
String item项文本 -
SetNoScrollCount(nCount)
-
无滚动条最大项
Parameters:
Name Type Description nCount
Number Properties:
Name Type Description NoScrollCount
Number 5 -
SetOptionBgColor(strColor)
-
下拉框选项背景颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description OptionBgColor
Color "0xffffffff" -
SetOptionBgDrawColor(bDrawColor)
-
下拉框选项背景以颜色绘制
Parameters:
Name Type Description bDrawColor
Boolean Properties:
Name Type Description OptionBgDrawColor
Boolean true -
SetOptionBgImg(strPath)
-
下拉框选项背景图片
Parameters:
Name Type Description strPath
ImageProp 图片地址 Properties:
Name Type Description OptionBgImg
ImageProp "" -
SetOptionBorderColor(strColor)
-
下拉框选项边框颜色
Parameters:
Name Type Description strColor
String 边框颜色 Properties:
Name Type Description OptionBorderColor
Color "0xff000000" -
SetOptionBorderSize(nSize)
-
选项下拉框边框宽度
Parameters:
Name Type Description nSize
Number 边框宽度 Properties:
Name Type Description OptionBorderSize
Number 1 -
SetOptionFontSize(nSize)
-
选项文本大小
Parameters:
Name Type Description nSize
Number Properties:
Name Type Description OptionFontSize
Number 12 -
SetOptionTextHorAlign(strAlign)
-
选项文本水平布局
Parameters:
Name Type Description strAlign
String 水平对齐 Properties:
Name Type Description OptionTextHorAlign
Combo ["center","left","right"] -
SetOptionTextPosition(nXPos, nYPos)
-
选项文本位置
Parameters:
Name Type Description nXPos
Number 左偏移 nYPos
Number 上偏移 Properties:
Name Type Description OptionTextPosition
Collection [50,50] -
SetOptionTextVerAlign(strAlign)
-
选项文本竖直布局
Parameters:
Name Type Description strAlign
String Properties:
Name Type Description OptionTextVerAlign
Combo ["middle","top","bottom"] -
SetScrollBarColor(bgColor, trackColor, ThumbColor, ButtonColor)
-
滚动条颜色
Parameters:
Name Type Description bgColor
Number 背景色 trackColor
Number 轨道颜色 ThumbColor
Number 滑块颜色 ButtonColor
Number 按钮颜色 Properties:
Name Type Description SetScrollBarColor
Collection ["0x0000ff00","0x0000ff00","0xff1e4952","0x0000ff00"] -
SetScrollBarFacade(nWidth, nTrackR, nThumbR, nButtonH, nButtonR)
-
滚动条样式
Parameters:
Name Type Description nWidth
Number 滚动条宽度 nTrackR
Number 轨道圆角 nThumbR
Number 滑块圆角 nButtonH
Number 按钮高度 nButtonR
Number 按钮圆角 Properties:
Name Type Description ScrollBarFacade
Collection [8,10,10,0,0] -
SetSelectedTextColor(strColor)
-
当前字体颜色
Parameters:
Name Type Description strColor
String 字体颜色 Properties:
Name Type Description SelectedTextColor
Color "0xff000000" -
SetSelectedTextHorAlign(strAlign)
-
当前文本水平布局
Parameters:
Name Type Description strAlign
String 水平对齐 Properties:
Name Type Description SelectedTextHorAlign
Combo ["center","left","right"] -
SetSelectedTextPosition(nXPos, nYPos)
-
当前文本位置
Parameters:
Name Type Description nXPos
Number 左偏移 nYPos
Number 上偏移 Properties:
Name Type Description SelectedTextPosition
Collection [50,50] -
SetSelectedTextSize(nSize)
-
当前字体大小
Parameters:
Name Type Description nSize
Number 字体大小 Properties:
Name Type Description SelectedTextSize
Number 14 -
SetSelectedTextVerAlign(strAlign)
-
当前文本竖直对齐
Parameters:
Name Type Description strAlign
String Properties:
Name Type Description SelectedTextVerAlign
Combo ["middle","top","bottom"]