Search

Module: Editor

Version: 2.2.1 +

User: Developer

Object Type: Output Object

Parent of:

- Button

- WebLabel

Child of:

- WebPage

- WebPanel

 

Description

A DropDownList is an input-field that holds a list that can be expanded. This feature is represented by the down arrow at the right of the field. By clicking the DropDownList object, the list with the options to chose from is expanded, so that the user can select one.

There are two ways to define the options within the DropDownList. You can add WebLabels or Buttons directly within the DropDownList, which will each be displayed as options. Or you can use the RepeatData and RepeatTarget properties, to create options out of a table. An example of the latter use is given at the bottom of this page.

Properties

AutoPostBack

A postback is an action taken by an interactive webpage, when the entire page and its contents are sent to the server for processing some (submitted) information and then, the server posts the same page back to the browser.
Possible values of the AutoPostBack property are 'True' or 'False'. If the value is 'True', then the input of the DropDownList will be used directly in the calculation after you've selected it. If the value is 'False', then the input will not directly be processed.

DebugLogMode (from version 4.1)

Indicates the level of detail of debug information that is logged during runtime of the website to the trace, a logfile, a database etc. The possible values are:

  • None: no debug information is logged
  • Simple: only basic information is given
  • Extended: in addition to the information in the Simple mode the values of all the properties of the object are shown

Enabled

Possible values are 'True' or 'False'. If the value is 'False', then the object can not be used within the application.

IsPublic

Possible values are 'True' or 'False'. If the value is 'False', then the object can only be used within the document where it is created. If the value is 'True', then also from other Futurama documents can be referred to this object. This means that changes in the object also affect the document in which is referred to this object. If the value is 'True' and you attempt to move or delete the object, a warning will be given. To limit these warnings to a minimum it is recommended to set IsPublic to 'True' only when necessary.

RepeatData

The property RepeatData can be used when the options in the DropDownList are all in the same table. You can then refer to this table in this property, and use the RepeatTarget property to loop through the table.

RepeatTarget

This property is used in conjunction with RepeatData. It can only refer to a UserVariable. The RepeatTarget property can be considered as the counter of a loop. During the execution of the loop it subsequently gets assigned all the values in the table defined in the RepeatData property.

ToolTip

In the property Tooltip a text can be entered that is shown in the application when a cursor is moved across the DropDownList. In this way information about the usage of the DropDownList can be given to the user.

UserVariable

Here you should select the UserVariable that should get its value by the option chosen from the DropDownList. This value is determined by the index of the option selected. If the option is the first one in the list, the UserVariable will have the value 0. If the option is the second one in the list, the value will be 1, etc.

Visible

Possible values are 'True' or 'False'. If the value is 'True', the object will be rendered and therefore displayed in your application. If the value is 'False', the object will not be rendered.

XmlName

The name of the object as it is shown in the source of the website. By default the XmlName is equal to the name given in the property (Name) with spaces replaced by underscores, but you are free to change it.

(Name)

The name of the object.

Comment

Here a comment can be entered. For example a short description of the object.

ID

The unique identification number of the object. This number is automatically generated by Futurama on the moment of creation. This number can be used when searching for a certain object in the Find Window.

UpdatePanel

In this property you can create a reference to a WebPanel. When the DropDownList is then used in the application, ónly this WebPanel will be refreshed. The rest of the page will not be changed. When the property is left empty, the WebPage will be refreshed as a whole.

This property only applies when the property AutoPostBack is set on 'True'.

CssClass

Here the CssClass can be entered. In the stylesheet you can define the style elements that belong to this class.

Rendering

A DropDownList object is rendered as follows:

The number of option elements in the code above depends on the number of options submitted in the DropDownList.
If you've entered a classname in the CssClass property, this will be added as a class attribute in the select element.

Example

This example shows the usage of the DropDownList.

Download

Download the Futurama Document DropDownList Example.

Description

  1. Open the XML-document which is contained in the zip-file in the Futurama Editor (Version 4.2.1 or later).
  2. There are two WebPanels, both with a DropDownList.
  3. The first one is filled by adding WebLabels within the DropDownList object.
  4. The second one is filled using the RepeatData and RepeatTarget properties.
  5. When running this 'application' in your browser, you can see both DropDownLists have the multiple options we intented.

Related Topics

- Futurama Objects: The Atlas chapter that describes all Futurama objects. See the Output-section for a description of the type of objects this object belongs to.

- UserVariable

Relevant Tutorials

- Adding interactivity to your website: This tutorial shows how you how to use the DropDownList to add interactivity to your website.

Updated: 2012-08-14