Share via


coolbar Behavior

This topic documents a feature of Binary Behaviors, which are obsolete as of Internet Explorer 10.

Adds a dynamic toolbar control to the document.

Syntax

XML
  	<Prefix:

CustomTag ID=sID STYLE="behavior:url('coolbar.htc')" />

HTML <ELEMENT STYLE="behavior:url('coolbar.htc')" ID=sID>
Scripting object.style.behavior = "url('coolbar.htc')"
object.addBehavior ("coolbar.htc")

Possible Values

Prefix Prefix that associates the CustomTag with an XML namespace. This prefix is set using the XMLNS attribute of the HTML tag.
CustomTag User-defined tag.
sID String that specifies a unique identifier for the object.

Members Table

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

Attribute Property Description
BUTTONHEIGHT buttonHeight Specifies the height of buttons within the coolbar behavior.
BUTTONWIDTH buttonWidth Specifies the width of buttons within the coolbar behavior.
SIZEALL sizeAll Specifies the width of buttons within the coolbar behavior.

Remarks

The behavior-defined members listed in the preceding table are not accessible through script until the window. onload event fires. Waiting for this event to fire ensures that the document is completely loaded, that all behaviors have been applied to corresponding elements on the document , and, consequently, that all the behavior's properties, methods, and events are available for scripting. Attempting to use any of the behavior-defined members will result in a scripting error indicating that the object does not support that particular member.

The coolbar behavior is used in conjunction with the coolbutton behavior.

The coolbar behavior inserts a toolbar into a document , populated with coolbuttons. Toolbars are a familiar interface for users. The coolbar behavior applies effects (3-D border, colored text, colored image) and supports ToolTips to bring each button to life.

Using form controls within the coolbar is not recommended because the mouse events captured for the coolbar behavior might interfere with access to the form controls.

The coolbar.htc file can be downloaded from the coolbar  sample page.

In addition to the members and styles previously listed, the coolbar behavior supports:

Example

This sample demonstrates the implementation and adjustments of the coolbar behavior.

<HTML XMLNS:IE>
<HEAD>
<STYLE>
IE\:Coolbutton{
   behavior: url(/behaviors/coolbutton.htc) ;
}
IE\:Coolbar{
   behavior: url(/behaviors/coolbar.htc) ;
}
</STYLE>

</HEAD>
<BODY>
<IE:Coolbar
   ID = "oCB"
   SIZEALL = "true"
   STYLE = "padding: 5px;"
>

<IE:Coolbutton
   ID = "oCButton1"
>
Button Label
</IE:Coolbutton>

</IE:Coolbar>
</BODY>
</HTML>

Code example: https://samples.msdn.microsoft.com/workshop/samples/author/behaviors/library/coolbar/coolbar_js.htm

See Also

Introduction to DHTML Behaviors, Using DHTML Behaviors