Combobox

出自OpenFace

跳转到: 导航, 搜索

目录

<combobox>

--Xuhb 2008年3月29日 (六) 11:25 (CST)

A combo box is usually used to interact with users like provide users with a group of selection composed with a button, a editable text and a list. In LZX, list item can be positiond in the combo box. When an item is selected, its value attribute will be converted to be character string and put into the editable text. You need to supply the buttons and lists form the component when inherit from and extends this component, or it will not be functional.

Attributes

Name        Usage      Type(Tag)    Type (JS)    Default    Category

attachoffset      Tag & JS     number     Number     1      setter

The offset between the list and editable text when the list pop up.


editable        Tag & JS     boolean     Boolean    false     setter

If the text from the list is editable.


listBorderColor     Tag & JS     color      Color     0x777777   setter

The color of the list boarder.


listBorderSize     Tag & JS      number    Number     1      setter

The width of the list boarder.


listHeight       Tag & JS      number    Number     36      setter

The height of the list boarder.


textBGColor      Tag & JS      color      Color     0xffffff     setter

The background color of the text from list.



--Xuhb 2008年3月29日 (六) 11:25 (CST) [这部分和laszlo不同,组件直接继承自相对应的java类,具体的继承关系请参考API文档]

Attributes inherited from BaseComboBox

Attributes inherited from Container

Attributes inherited from Component

align, bgcolor, clip, cloneManager, datapath, enabled, fgcolor, focusable, fontsize, frame, hassetheight, hassetwidth, height, ignorelayout, ignorex, ignorey, mask, opacity, resource, resourceheight, resourcewidth, rotation, source, totalframes, valign, visible, width, x, y

Attributes inherited from Node

id, name, parent, subnodes


Methods

addItem(BaseListItem item)

combobox.addItem(item)

Add an item to the end of the list.

Parameters

Name       Type           Desc

item        BaseListItem       a list item


addItemAt(BaseListItem item, int i_index)

combobox.addItemAt(item, i_index)

Add an item to the specified position of the list.

Parameters

Name       Type           Desc

item        BaseListItem        a list item

i_index       int            specified position


removeItem(BaseListItem item)

combobox.removeItem(item)

Remove a list item from the list.

Parameters

Name       Type           Desc

item        BaseListItem       a list item


removeItemAt(int i_index)

combobox.removeItemAt(i_index)

Remove the list item from index (at parameter specified position).

Parameters

Name       Type           Desc

i_index       int            specified position


--Xuhb 2008年3月29日 (六) 11:34 (CST) [这部分和laszlo不同,组件直接继承自相对应的java类,具体的继承关系请参考API文档]

Methods inherited from BaseComboBox

Methods inherited from Container

Methods inherited from Component

applyData, containsPt, converseToRelativeX, converseToRelativeY, dataBind, destroy, getAbsoluteX, getAbsoluteY, getAttribute, getBounds, getBGColor, getColor, getFontSize, getHeight, getParent, getResource, getRotation, getSource, getTotalFrames, getVisible, getWidth, getX, getY, getWidth, hasSetFGColor, hasSetFontSize, instantiateDone, isEnabled, isFocusable, sendBehind, sendInFrontOf, sendToBack, setAlign, setAttributeRelative, setBGColor, setClickable, setColor, setDatapath, setHeight, setOpacity, setResource, setResourceNumber, setRotation, setSource, setValign, setVisible, setWidth, setX, setY, stretchResource

Methods inherited from Node

getAttribute, setAttribute,applyConstraint


Events

--Xuhb 2008年3月29日 (六) 11:34 (CST) [这部分和laszlo不同,组件直接继承自相对应的java类,具体的继承关系请参考API文档]

Events inherited from Node

ondata, oninit