ListBox

From HTML5 Builder
Jump to: navigation, search

The ListBox component is a list. You can manage its items through its Items property.

Usage

Fill From a Datasource

You can fill a ListBox from a Datasource component with a function like this one:

function loadListBox($sender, $params)
{
	$this->Datasource1->DataSet->first();
	while( ! $this->Datasource1->DataSet->EOF )
	{
		$this->ListBox1->AddItem($this->Datasource1->DataSet->Fields["column_name"]);
		$this->Datasource1->DataSet->next();
	}
}

Client-side Features

DOM Elements

The component generates the following client-side DOM elements:

  • Wrapper (HTMLDivElement). Full web browser support. Access it with $("#ComponentName_outer").get()[0].
    • Main element (HTMLSelectElement). Full web browser support. Access it with: $("#ComponentName").get()[0].
      • Option group (optional) . Full web browser support. Access it with: $("#ComponentName optgroup").get()[OptionGroupIndex].
        • Option (HTMLOptionElement). Full web browser support. Access it with: $("#ComponentName option").get()[OptionIndex].

Client-side Events

Documented in the RPCL Reference.

Server-side Features

Properties, Methods and Events

Documented in the RPCL Reference.

See Also

  • Alternatives: MList (mobile applications).