User Tools

Site Tools


DzListViewItem

DAZScript wrapper for Q3ListViewItem.

More...

Inherits :

Inherited By : DzCheckListItem

Properties

Constructors

DAZ Script
DzListViewItem ( DzListView parent, Number id=-1 )
DzListViewItem ( DzListViewItem parent, Number id=-1 )

Methods

DAZ Script
voidaddDataItem ( String key, Object val )
NumberchildCount ()
Numbercompare ( DzListViewItem item, Number column, Boolean ascending )
voiddeleteItem ( DzListViewItem item )
Numberdepth ()
DzListViewItemfirstChild ()
ObjectgetDataItem ( String key )
NumbergetNumDataItems ()
voidinsertItem ( DzListViewItem newChild )
DzListViewItemitemAbove ()
DzListViewItemitemBelow ()
Stringkey ( Number column, Boolean ascending )
DzListViewlistView ()
voidmoveItem ( DzListViewItem item )
DzListViewItemnextSibling ()
DzListViewItemparent ()
Pixmappixmap ( Number column )
voidremoveItem ( DzListViewItem item )
BooleanrenameEnabled ( Number column )
voidsetPixmap ( Number column, Pixmap pm )
voidsetRenameEnabled ( Number column, Boolean yesNo )
voidsetText ( Number column, String text )
voidsort ()
voidsortChildItems ( Number column, Boolean ascending )
voidstartRename ( Number column )
Stringtext ( Number column )

Detailed Description

This class is not a widget, but a helper class for working with DzListView. Each DzListViewItem represents a single item in a list view - add items to a list view by creating a new DzListViewItem that is a child of the list view, or a child of another list view item in the list view.

Properties


Boolean : dragEnabled

Holds whether the item can be dragged


Boolean : dropEnabled

Holds whether the item can have other items dropped on it


Boolean : enabled

Holds whether the item can be enabled


Boolean : expandable

Holds whether the item can be expanded (opened)


Number : height

Holds the height of the item.


Number : id

Holds the identifier for this item. (Read Only)


Boolean : multiLinesEnabled

Holds whether the item can be displayed on multiple lines


Boolean : open

Holds whether the item is expanded (open) or collapsed (closed)


Boolean : selectable

Holds whether the item can be selected


Boolean : selected

Holds whether the item is selected


Boolean : visible

Holds whether the item is visible

Constructors


DzListViewItem( DzListView parent, Number id=-1 )

Creates a list view item at the root level of the given list view

Parameter(s):

  • parent - The listview to create this item as a child of
  • id - The identifier for this item

DzListViewItem( DzListViewItem parent, Number id=-1 )

Creates a list view item as a child of the given list view item

Parameter(s):

  • parent - The item to create this item as a child of
  • id - The identifier for this item

Methods


void : addDataItem( String key, Object val )

Adds an arbitrary data item to be stored with the item


Number : childCount()

Return Value:

  • The number of children in this item.

Number : compare( DzListViewItem item, Number column, Boolean ascending )

Compares the given listview item with this item


void : deleteItem( DzListViewItem item )

Deletes given item from the list view item's list of children items.


Number : depth()

Return Value:

  • The depth of this item

DzListViewItem : firstChild()

Return Value:

  • The first child of this list view item

Object : getDataItem( String key )

Return Value:

  • The value of an arbitrary data item

Number : getNumDataItems()

Return Value:

  • The number of data items on the item

void : insertItem( DzListViewItem newChild )

Insert the item as a child of this item


DzListViewItem : itemAbove()

Return Value:

  • The item above this list view item

DzListViewItem : itemBelow()

Return Value:

  • The item below this list view item

String : key( Number column, Boolean ascending )

Sets the column and order that determines how the list is sorted


DzListView : listView()

Return Value:

  • The list view that this item resides in

void : moveItem( DzListViewItem item )

Moves this item to be after the given item, which must be one of its siblings


DzListViewItem : nextSibling()

Return Value:

  • The next sibling of this list view item

DzListViewItem : parent()

Return Value:

  • The parent of this list view item

Pixmap : pixmap( Number column )

Return Value:

  • The pixmap for this item in the given column

void : removeItem( DzListViewItem item )

Remove the item from the children of this item


Boolean : renameEnabled( Number column )

Return Value:

  • Whether or not the text in the given column can be changed by the user.

void : setPixmap( Number column, Pixmap pm )

Sets the pixmap for this item in the given column


void : setRenameEnabled( Number column, Boolean yesNo )

Sets whether or not the text in the given column can be changed by the user.


void : setText( Number column, String text )

Set the text for this list view item in the given column


void : sort()

Sorts the children of this item according to the current sorting column and order.


void : sortChildItems( Number column, Boolean ascending )

Sorts the children items of this item by the given column in the given order.


void : startRename( Number column )

Starts a rename operation.


String : text( Number column )

Return Value:

  • The text for this list view item in the given column