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

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.

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.
SELECTEDSTYLE Sets or retrieves a value that indicates the style for the selected element.
Methods
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: http://samples.msdn.microsoft.com/workshop/samples/webcontrols/toolbar/ToolBarButton.htm

Applies To

TOOLBAR

See Also

Show:
© 2015 Microsoft