DOM::HTMLSelectElement class Reference (khtml Library)

| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# DOM::HTMLSelectElement Class Reference

The select element allows the selection of an option. More...

`#include <html_form.h>`

Inheritance diagram for DOM::HTMLSelectElement:

[legend]
Collaboration diagram for DOM::HTMLSelectElement:

[legend]
List of all members.

## Public Member Functions
| HTMLSelectElement (const HTMLSelectElement &other)
| HTMLSelectElement (const Node &other)
HTMLSelectElement & | operator= (const HTMLSelectElement &other)
HTMLSelectElement & | operator= (const Node &other)
DOMString | type () const
| The type of control created.
long | selectedIndex () const
| The ordinal index of the selected option.
void | setSelectedIndex (long)
| see selectedIndex
DOMString | value () const
| The current form control value.
void | setValue (const DOMString &)
| see value
long | length () const
| The number of options in this `SELECT` .
HTMLFormElement | form () const
| This class or method is obsolete, it is provided for compatibility only..
HTMLCollection | options () const
| The collection of `OPTION` elements contained by this element.
bool | disabled () const
| The control is unavailable in this context.
void | setDisabled (bool)
| see disabled
bool | multiple () const
| If true, multiple `OPTION` elements may be selected in this `SELECT` .
void | setMultiple (bool)
| see multiple
DOMString | name () const
| Form control or object name when submitted with a form.
void | setName (const DOMString &)
| see name
long | size () const
| Number of visible rows.
void | setSize (long)
| see size
long | tabIndex () const
| Index that represents the element's position in the tabbing order.
void | setTabIndex (long)
| see tabIndex
void | add (const HTMLElement &element, const HTMLElement &before)
| Add a new element to the collection of `OPTION` elements for this `SELECT` .
void | remove (long index)
| Remove an element from the collection of `OPTION` elements for this `SELECT` .
void | blur ()
| Removes keyboard focus from this element.
void | focus ()
| Gives keyboard focus to this element.
## Protected Member Functions
| HTMLSelectElement (HTMLSelectElementImpl *impl)

## Detailed Description

The select element allows the selection of an option.

The contained options can be directly accessed through the select element as a collection. See the SELECT element definition in HTML 4.0.

Definition at line 809 of file html_form.h.

## Member Function Documentation

DOMString HTMLSelectElement::type | ( |  | ) | const

| The type of control created. Definition at line 758 of file html_form.cpp.

long HTMLSelectElement::selectedIndex | ( |  | ) | const

| The ordinal index of the selected option. The value -1 is returned if no element is selected. If multiple options are selected, the index of the first selected option is returned. Definition at line 764 of file html_form.cpp.

void HTMLSelectElement::setSelectedIndex | ( | long |  | ) |

| see selectedIndex Definition at line 770 of file html_form.cpp.

DOMString HTMLSelectElement::value | ( |  | ) | const

| The current form control value. Definition at line 776 of file html_form.cpp. Referenced by setSize().

void HTMLSelectElement::setValue | ( | const DOMString & |  | ) |

| see value Definition at line 782 of file html_form.cpp. References DOM::DOMString::implementation(), and DOM::DOMString::isNull().

long HTMLSelectElement::length | ( |  | ) | const

| The number of options in this `SELECT` . Definition at line 788 of file html_form.cpp.

HTMLFormElement HTMLSelectElement::form | ( |  | ) | const

| This class or method is obsolete, it is provided for compatibility only.. ### KDE 4.0: remove. Reimplemented from DOM::Element. Definition at line 794 of file html_form.cpp.

HTMLCollection HTMLSelectElement::options | ( |  | ) | const

| The collection of `OPTION` elements contained by this element. Definition at line 799 of file html_form.cpp.

bool HTMLSelectElement::disabled | ( |  | ) | const

| The control is unavailable in this context. See the disabled attribute definition in HTML 4.0. Definition at line 805 of file html_form.cpp.

void HTMLSelectElement::setDisabled | ( | bool |  | ) |

| see disabled Definition at line 811 of file html_form.cpp.

bool HTMLSelectElement::multiple | ( |  | ) | const

| If true, multiple `OPTION` elements may be selected in this `SELECT` . See the multiple attribute definition in HTML 4.0. Definition at line 817 of file html_form.cpp.

void HTMLSelectElement::setMultiple | ( | bool |  | ) |

| see multiple Definition at line 823 of file html_form.cpp.

DOMString HTMLSelectElement::name | ( |  | ) | const

| Form control or object name when submitted with a form. See the name attribute definition in HTML 4.0. Definition at line 828 of file html_form.cpp.

void HTMLSelectElement::setName | ( | const DOMString & |  | ) |

| see name Definition at line 834 of file html_form.cpp.

long HTMLSelectElement::size | ( |  | ) | const

| Number of visible rows. See the size attribute definition in HTML 4.0. Definition at line 839 of file html_form.cpp.

void HTMLSelectElement::setSize | ( | long |  | ) |

| see size Definition at line 845 of file html_form.cpp. References QString::number(), and value().

long HTMLSelectElement::tabIndex | ( |  | ) | const

| Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0. Definition at line 854 of file html_form.cpp.

void HTMLSelectElement::setTabIndex | ( | long |  | ) |

| see tabIndex Definition at line 860 of file html_form.cpp.

void HTMLSelectElement::add | ( | const HTMLElement & | element,
|  | const HTMLElement & | before
| ) |

  | Add a new element to the collection of `OPTION` elements for this `SELECT` . Parameters:
  element | The element to add.
  before | The element to insert before, or 0 for the tail of the list.
Definition at line 866 of file html_form.cpp.

void HTMLSelectElement::remove | ( | long | index | ) |

  | Remove an element from the collection of `OPTION` elements for this `SELECT` . Does nothing if no element has the given index. Parameters:
  index | The index of the item to remove.
Definition at line 877 of file html_form.cpp.

void HTMLSelectElement::blur | ( |  | ) |

| Removes keyboard focus from this element. Definition at line 882 of file html_form.cpp.

void HTMLSelectElement::focus | ( |  | ) |

| Gives keyboard focus to this element. Definition at line 888 of file html_form.cpp.

The documentation for this class was generated from the following files:

- html_form.h
- html_form.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:37:58 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001