# listviewtitem class

A listviewitem class

Inherits
listviewitem
Description

The listviewitem class implements a list view item. A list view item is a multi-column object capable of displaying itself in a listview. To use this class you must instantiate it with another listviewitem or a listview as parent. The item will be automatically displayed. You can set the text and a pixmap in each column and you can make it checkable with $setcheckable(). A checkable listviewitem will display a small check mark in the first column.

Functions

`$setText(<column:integer>,<text:string>)`
Sets the text in column column to text, if column is a valid column number and text is different from the existing text.
`<string> $text(<column:integer>)`
Returs the text of the specified column.
`$setPixmap(<column:integer>,<pixmap:hobject or imageID>)`
Sets the pixmap in column column to pm, if pm is non-null and different from the current pixmap, and if column is non-negative. Pixmap can be a Kvirc imageid, an image file or a pixmap object.
`$setItemEditable(<bEnabled:boolean>)`
If bEnabled is TRUE (1), this item can be in-place editable by the user; otherwise it cannot be editable in-place.
`$isItemEditable()`
Returns $true if this item is editable and $false otherwise.
`$setEnabled(<bEnabled:boolean>)`
Enables or disables the item.
`$isEnabled()`
Returns $true if this item is enabled and $false otherwise.
`$setOpen(<bOpen:boolean>)`
Opens or closes the item to show its children items.
`$isOpen()`
Returns the open state of this item
`$setCheckable(<bCheckable:boolean>)`
Makes this item checkable or not. This function should be called immediately after the item creation: changing this property later at runtime may have strange results (like the item being moved inside the list, text disappearing, hidden children etc... don't do it :D ).
`$isCheckable()`
Returns $true if this item is checkable and $false otherwise
`$setChecked(<bChecked:boolean>)`
Sets this item to be checked or not. $setcheckable() must have been previously called.
`$isChecked()`
Returns the check status of this item. $setcheckable() must have been previously called.
`$setFlags(<flag1:string>, <flag2:string>, ...)`

Sets the flags for the item to the given flags. These determine whether the item can be selected or modified. This is often used to disable an item. Supported flags are: - noitemflag : no flag sets; - selectable : item is selecatble; - editable : item is editable; - dragEnabled : item can dragged; - dropEnabled : item can used as drop target; - userCheckable : item is checkable; - enabled :item is enabled; - tristate : item is checkable with three separate states.

Index, Object Classes

KVIrc 4.0.2.4740 Documentation
Generated by root at Tue Feb 1 06:16:04 2011