TOOLBARDROPDOWNLIST Element | ToolbarDropDownList Object

Adds a ToolbarDropDownList element to a Toolbar.

Syntax

HTML <namespace:TOOLBARDROPDOWNLIST

Possible Values

namespace Prefix that associates a custom tag with an XML namespace. This prefix is set using the XMLNShtml

Remarks

To create the list of options for the ToolbarDropDownList, use the ListItem control.

This element is a block element.

This element requires a closing tag.

Members Table

The following table lists the members exposed by the ToolbarDropDownList object.

Attribute Property Description
DEFAULTSTYLE Sets or retrieves a value that indicates the default style for the element.
HOVERSTYLE Sets or retrieves a value that indicates the style of the element when the user hovers the keyboard focus or mouse pointer over it.
selectedIndex Sets or retrieves a value that indicates the index of the selected object.
SELECTEDSTYLE Sets or retrieves a value that indicates the style for the selected element.
Event Description
onchange Fires when an OPTIONToolbarDropDownListToolbarTextBox
Method Description
getAttribute Retrieves the value of the specified attribute.
getOptions Retrieves a collection of the child OPTIONToolbarDropDownList
getType Retrieves the type of item.
remove Removes the item from the Toolbar
setAttribute Sets the value of the specified attribute.

Example

The following example shows how to use the TOOLBARDROPDOWNLIST element to add a drop-down list to a Toolbar.


<HTML xmlns:TOOLBAR>
<?import namespace="TOOLBAR" implementation="toolbar.htc">

<BODY>

<TOOLBAR:TOOLBAR STYLE="display:inline" ID="oToolBar">

<TOOLBAR:TOOLBARSEPARATOR />

    <TOOLBAR:TOOLBARDROPDOWNLIST>
        <OPTION VALUE="Item 1">Item 1</OPTION>
        <OPTION VALUE="Item 2">Item 2</OPTION>
        <OPTION VALUE="Item 3">Item 3</OPTION>
        <OPTION VALUE="Item 4">Item 4</OPTION>
    </TOOLBAR:TOOLBARDROPDOWNLIST>
 
<TOOLBAR:TOOLBARSEPARATOR />
</TOOLBAR:TOOLBAR

</BODY>
</HTML>

Code example: https://samples.msdn.microsoft.com/workshop/samples/webcontrols/toolbar/toolbarDropDownList.htm

Applies To

ListItem, TOOLBAR

See Also

Internet Explorer WebControls, About the Toolbar WebControl