# combobox class Combined button and popup list
Inherits
object widget
Functions
`$insertItem(<text:string>, <index:int>)`
Inserts a text item at position <index>. If index is negative or not specified the item is appended.
`$changeItem(<text:string>, <index:uint>)`
Changes text of item at <index> to <text>.
`$removeItem(<index:uint>)`
Removes item at given index.
`$setMaxCount(<num:uint>)`
Sets the maximum number of items the combo box can hold to <num>. If <num> is smaller than the current number of items, the list is truncated at the end. There is no limit by default.
`<integer> $maxCount()`
Returns the current maximum number of items in the combo box.
`<integer> $count()`
Returns number of items in the widget.
`<string> $current()`
Returns currently selected item.
`<integer> $currentItem()`
Returns index of currently selected item.
`$setEditable(<bflag:boolean>)`
Make the input field editable, if <bflag>. Otherwise the user may only choose one of the items in the combo box. If the parameter is ommited, it is assumed to be false.
`<boolean> $editable()`
Returns whether the combobox is editable or not.
`$setEditText(<text:string>,[<quiet:bool>])`
Sets the text in the embedded line edit to newText without changing the combo's contents. Does nothing if the combo isn't editable. If the optional quiet parameter is true no warning will be print if text will be empty.
`$clear()`
Removes all the items from the combo box
`$textAt(<index:uint>)`
Returns item at given index.
`$setCurrentItem(<index:uint>)`
Sets the current combobox item. This is the item to be displayed on the combobox button.
`$activatedEvent(<index:integer>)`
This function is called by the framework when a new item has activated. The index value is the position of the new item. The default implementation emits the $activated() signal,
`$textChangedEvent(<text:string>)`
This function is called when the text in an editable combobox has changed. The function return the new text in its argument. The default implementation emits the $textChanged() signal.
Signals
`$textChanged()`
This signal is emitted by the default implementation of $textChangedEvent().
`$activated()`
This signal is emitted by the default implementation of $activatedEvent().

Index, Object Classes

KVIrc 4.2.0.6190 Documentation
Generated by nobody at Thu May 29 11:24:48 2014