TOOLBARBUTTON Element | ToolbarButton Object

Adds a ToolbarButton element to a Toolbar.

Syntax

HTML <namespace:TOOLBARBUTTON ... >

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.

Members Table

The following table lists the members exposed by the ToolbarButton 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.
SELECTEDSTYLE Sets or retrieves a value that indicates the style for the selected element.
Method Description
getAttribute Retrieves the value of the specified attribute.
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 TOOLBARBUTTON element to add a button to a Toolbar.


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

<BODY>

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

<TOOLBAR:TOOLBARLABEL TEXT="BUTTON:"/>
<TOOLBAR:TOOLBARBUTTON IMAGEURL="/workshop/graphics/tool-mail.gif" 
TEXT="Send New Mail Message" 
DEFAULTSTYLE="background-color:#FFFFFF; color:#000000"
HOVERSTYLE="background-color:#FFFFCC; color:#666666"
SELECTEDSTYLE="color:#FF0033; border:1px solid #000000"
 />
 
</TOOLBAR:TOOLBAR> 

</BODY>
</HTML>

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

Applies To

TOOLBAR

See Also

Internet Explorer WebControls, About the Toolbar WebControl