Advanced JavaScript Library
 
 
 
System.Controls.CommandStrip
Home > Documentation > 3.0 Controls > System.Controls.CommandStrip
Developed by Exbos Limited.
 
*** Depreciated ***
This control has been depreciated please see System.Controls.ControlStrip. For consistancy with the ControlGrid the command strip has been replaced by the ControlStrip. 

 
Summary
An command strip alows controls to be grouped together and automatically arranged along a strip in either vertical or horizontal format. The class contains helper functions for quickly creating tool bars. The followind layout modes are supported by the control: LAYOUT_VERTICAL (0) LAYOUT_HORIZONTAL (1) LAYOUT_SPRING_VERTICAL (2) LAYOUT_SPRING_HORIZONTAL (3) LAYOUT_FIT_VERTICAL (4) LAYOUT_FIT_HORIZONTAL (5)

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Set layout mode
commandExample.Move(0, 0);
commandExample.Resize(512, 24);
commandExample.SetLayout(commandExample.LAYOUT_HORIZONTAL);

// Add some buttons
commandExample.AddToolBarButton("New", "%THEME%/Images/New.png");
Methods
Initialize GetLayout SetLayout GetPadding SetPadding ArrangeLayout AddToolBarButton AddToolBarTextButton AddToolBarSeperator

Events
This class has no events.


Initialize ()

Summary
The Initialize method is supported by all controls that inherit from the System.Controls.Control class. The method performs the actual creation of the control and the attachment to the document object model. The call is often overridden by its child classes to perform any additional object initialization that might be required.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();
GetLayout ()

Summary
Gets the current layout mode applied to the control.

Parameters
This method has no parameters.

Return Value
The current layout mode applied by the control.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Get layout mode
System.Messagebox("Default Layout Mode", commandExample.GetLayout();
SetLayout (layoutMode)

Summary
Sets the layout mode applied to the control and performs a rearrange.

Parameters
Parameter Description
layoutMode The layout mode to applied on the strip.

Return Value
This method does not return a value.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Set layout mode
commandExample.Move(0, 0);
commandExample.Resize(512, 24);
commandExample.SetLayout(commandExample.LAYOUT_HORIZONTAL);
GetPadding ()

Summary
Gets the current padding applied around controls on the strip.

Parameters
This method has no parameters.

Return Value
The current padding in pixels applied by the control.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Get padding
System.Messagebox("Default Padding", commandExample.GetPadding();
SetPadding (iPadding)

Summary
Sets the padding applied to the control and performs a rearrange.

Parameters
Parameter Description
iPadding The padding applied to controls on the strip.

Return Value
This method does not return a value.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Set padding
commandExample.Move(0, 0);
commandExample.Resize(512, 24);
commandExample.SetPadding(8);
ArrangeLayout ()

Summary
Forces a rearrange of the controls on the strip. This is normally done when a new control is added or an existing control is resized.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Force arrange
commandExample.ArrangeLayout();
AddToolBarButton (sText, sImageUrl, delgateAction, sClass, sHoverClass)

Summary
Provides a helper function to quickly add a button onto the command strip making it easy to create a standard look and feel toolbar.

Parameters
Parameter Description
sText The text displayed when the button is hovered.
sImageUrl The url of an image to display on the button.
delgateAction Optional function to call when the button is clicked.
sClass Optionally override the default css class for the button.
sHoverClass Optionally override the hover css class for the button.

Return Value
This method does not return a value.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Set layout mode
commandExample.Move(0, 0);
commandExample.Resize(512, 24);
commandExample.SetLayout(commandExample.LAYOUT_HORIZONTAL);

// Add some buttons
commandExample.AddToolBarButton("New", "%THEME%/Images/New.png");
AddToolBarTextButton (sText, sImageUrl, delgateAction, sDescription, sClass, sHoverClass)

Summary
Provides a helper function to quickly add a button with adjacent text onto the command strip making it easy to create a standard look and feel toolbar with text and tooltips.

Parameters
Parameter Description
sText The text displayed when the button is hovered.
sImageUrl The url of an image to display on the button.
delgateAction Optional function to call when the button is clicked.
sDescription Optional description to display in the tooltip.
sClass Optionally override the default css class for the button.
sHoverClass Optionally override the hover css class for the button.

Return Value
This method does not return a value.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Set layout mode
commandExample.Move(0, 0);
commandExample.Resize(512, 24);
commandExample.SetLayout(commandExample.LAYOUT_HORIZONTAL);

// Add some buttons
commandExample.AddToolBarTextButton("New", "%THEME%/Images/New.png", null, "My Description");
AddToolBarSeperator ()

Summary
Provides a helper function to quickly add a seperator between buttons onto the command strip making it easy to create a standard look and feel toolbar with divided sections.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var commandExample;

// Create Command Strip
commandExample = System.CreateObject("System.Controls.CommandStrip");
commandExample.Initialize();

// Set layout mode
commandExample.Move(0, 0);
commandExample.Resize(512, 24);
commandExample.SetLayout(commandExample.LAYOUT_HORIZONTAL);

// Add buttons and a seperator
commandExample.AddToolBarButton("New", "%THEME%/Images/New.png");
commandExample.AddToolBarSeperator();
commandExample.AddToolBarButton("Cut", "%THEME%/Images/Cut.png");
 
Shopping Basket
Your shopping basket is currently empty.
 
 
RSS Feed   Powered By Commerce Cloud
This site is powered by the Commerce Cloud Engine. Copyright (c) 2009 Exbos Limited. All Rights Reserved. SiteMap   Cookie Policy
Web site design and layout by Exbos Ltd. Copyright (c) 2010 Exbos Ltd. All Rights Reserved.
Commerce Cloud provides multiple e-commerce sites with full product support