Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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 XMLNS attribute of the html tag.

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.

Attributes/Properties
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.
Events
Event Description
onchange Fires when an OPTION element is selected in a ToolbarDropDownList or when the ToolbarTextBox has changed and loses focus.
Methods
Method Description
getAttribute Retrieves the value of the specified attribute.
getOptions Retrieves a collection of the child OPTION objects of the ToolbarDropDownList object.
getType Retrieves the type of item.
remove Removes the item from the Toolbar object.
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: http://samples.msdn.microsoft.com/workshop/samples/webcontrols/toolbar/toolbarDropDownList.htm

Applies To

ListItem, TOOLBAR

See Also

Show:
© 2015 Microsoft