Class ListItem

(line 167)

Description

Object
   |
   --Persistent
      |
      --ListItem

Located in File: /comctrls.inc.php

ListItem is an individual item of a ListView control.

A ListItem specifies a row of the ListView, where Caption is the text shown in the first column and SubItems to following columns. Note that the count of ListColumn objects defines how many columns are shown, even if there are more SubItems. The ListItem was modeled after VCL for Windows, meaning that there is a caption and subitems. The caption is used for the first column where the subitems are used for any further column.



Properties

Summary:
Caption Caption is the text shown in the first column of the row.
Data Specifies any application-specific data associated with the list item.
ListView ListView is the reference back to the ListView where the ListItem belongs to.
Selected Indicates if the ListItem is selected or not.
SubItems An array of SubItems that are shown in the remaing columns.

Defined in class Persistent

NamePath Used to serialize/unserialize. It returns the full path to identify this component.
Owner Owner of the component.

property Caption (line 184)

string Caption

Caption is the text shown in the first column of the row.

Use Caption to name the list item. The Caption appears of the list view.

If the ReadOnly property of the list view is false, the user can edit the caption.


property Data (line 198)

mixed Data

Specifies any application-specific data associated with the list item.

Use Data to associate arbitrary data structure with the list item. When the user selects or deletes the list item, Data allows the application to quickly access information about the meaning of the list item to implement the appropriate response.


property ListView (line 215)

ListView ListView

ListView is the reference back to the ListView where the ListItem belongs to.

Read ListView to access the list view object that displays the item. Use the properties and methods of the list view object to make changes that affect the list item or to manipulate other items in the list.

Do not confuse the ListView that displays the item with the Owner of the item.


property Selected (line 228)

bool Selected

Indicates if the ListItem is selected or not.

Use Selected to select or unselect the list item. If the MultiSelect property of the list view is false, setting Selected to true sets the Selected property of all other list items in the list view to false.


property SubItems (line 242)

array SubItems

An array of SubItems that are shown in the remaing columns.

Note that if there are more sub items defined than columns, only the sub items are visible the are within the count of the column. The output of the sub items starts at the second column since the first column is used for Caption.


property NamePath

Used to serialize/unserialize. It returns the full path to identify this component.
This property is implemented in Persistent::NamePath

property Owner

Owner of the component.
This property is implemented in Persistent::Owner

Methods

Summary:

Defined in class Persistent

serialize Stores this object into the session.
unserialize This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Defined in class Object

__construct Constructs an object and initializes its data before the object is first used.
className Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
classParent Returns the type of the immediate ancestor of a class.

Events

Summary:

[none]

Javascript Events

Summary:

[none]

Documentation generated on Fri, 26 Dec 2008 11:44:05 +0100 by phpDocumentor 1.4.0a2