## 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 822)

    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 852)

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 954)

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

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

- return: custom attributes
- access: public

TAttributeCollection getAttributes ()
getEnabled (line 863)

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

boolean getEnabled ()
getHasAttributes (line 937)

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

boolean getHasAttributes ()
getSelected (line 879)

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

boolean getSelected ()
getText (line 895)

- return: text of the item
- access: public

string getText ()
getValue (line 911)

- return: value of the item
- access: public

string getValue ()
hasAttribute (line 946)

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

boolean hasAttribute (string $name)

- string $name: name of the attribute

removeAttribute (line 973)

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 963)

- access: public

void setAttribute (string $name, string $value)

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

setEnabled (line 871)

- access: public

void setEnabled (boolean $value)

- boolean $value: whether the item is enabled

setSelected (line 887)

- access: public

void setSelected (boolean $value)

- boolean $value: whether the item is selected

setText (line 903)

- access: public

void setText (string $value)

- string $value: text of the item

setValue (line 919)

- 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 Sun, 04 Jun 2006 18:59:47 -0400 by phpDocumentor 1.3.0RC4