## Class TListItem

Description

TListItem class.

TListItem represents an item in a list control. Each item has a Text property and a Value property. If either one of them is not set, it will take the value of the other property. An item can be Selected or Enabled, and it can have additional Attributes which may be rendered if the list control supports so.

- since: 3.0
- version: $Revision: $ $Date: $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/TListControl.php (line 764)

    TComponent
       |
       --TListItem

Method Summary
TListItem __construct ([string $text = ''], [string $value = ''], [boolean $enabled = true], [boolean $selected = false])
string getAttribute (mixed $name)
TAttributeCollection getAttributes ()
boolean getEnabled ()
boolean getHasAttributes ()
boolean getSelected ()
string getText ()
string getValue ()
boolean hasAttribute (string $name)
string removeAttribute (string $name)
void setAttribute (string $name, string $value)
void setEnabled (boolean $value)
void setSelected (boolean $value)
void setText (string $value)
void setValue (string $value)
Methods
Constructor __construct (line 794)

Constructor.

- access: public

TListItem __construct ([string $text = ''], [string $value = ''], [boolean $enabled = true], [boolean $selected = false])

- string $text: text of the item
- string $value: value of the item
- boolean $enabled: whether the item is enabled
- boolean $selected: whether the item is selected

getAttribute (line 896)

- return: the named attribute value, null if attribute does not exist
- access: public

string getAttribute (mixed $name)
getAttributes (line 869)

- return: custom attributes
- access: public

TAttributeCollection getAttributes ()
getEnabled (line 805)

- return: whether the item is enabled
- access: public

boolean getEnabled ()
getHasAttributes (line 879)

- return: whether the item has any custom attribute
- access: public

boolean getHasAttributes ()
getSelected (line 821)

- return: whether the item is selected
- access: public

boolean getSelected ()
getText (line 837)

- return: text of the item
- access: public

string getText ()
getValue (line 853)

- return: value of the item
- access: public

string getValue ()
hasAttribute (line 888)

- return: whether the named attribute exists
- access: public

boolean hasAttribute (string $name)

- string $name: name of the attribute

removeAttribute (line 915)

Removes the named attribute.

- return: attribute value removed, empty string if attribute does not exist.
- access: public

string removeAttribute (string $name)

- string $name: the name of the attribute to be removed.

setAttribute (line 905)

- access: public

void setAttribute (string $name, string $value)

- string $name: attribute name
- string $value: value of the attribute

setEnabled (line 813)

- access: public

void setEnabled (boolean $value)

- boolean $value: whether the item is enabled

setSelected (line 829)

- access: public

void setSelected (boolean $value)

- boolean $value: whether the item is selected

setText (line 845)

- access: public

void setText (string $value)

- string $value: text of the item

setValue (line 861)

- access: public

void setValue (string $value)

- string $value: value of the item

#### Inherited Methods

Inherited From TComponent

> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Documentation generated on Mon, 01 May 2006 23:04:01 -0400 by phpDocumentor 1.3.0RC4