Advanced JavaScript Library
 
 
 
System.Controls.Accordion
Home > Documentation > 3.0 Controls > System.Controls.Accordion
Developed by Exbos Limited.

Summary
An accordion control that can display multiple groups of controls under individual headers. Each group can be contracted or expanded effectively showing or hiding the area as required. As one area is expanded all other areas contract showing just their headers.

Example
var accordionExample;
var panelOne;
var labelOne;
var panelTwo;

// Create Accordion
accordionExample = System.CreateObject("System.Controls.Accordion");
accordionExample.Initialize();

// Add panel one and a control
panelOne = accordionExample.AddPanel("Panel One");
labelOne = accordionExample.AddControl("System.Controls.Label");
label.SetText("My New Label")

// Add empty panel two control
panelTwo = accordionExample.AddPanel("Panel Two");
Methods
Initialize AddPanel ArrangePanels

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 accordionExample;

// Create Accordion
accordionExample = System.CreateObject("System.Controls.Accordion");
accordionExample.Initialize();
AddPanel (sHeaderText)

Summary
The add panel method creates a new panel within the accordion control setting the header area to the text provided. The method returns a new System.Controls.AccordionPanel control that can then be use to add any required child controls. Any control that inherits from the base System.Controls.Control class can be added to an Accoridion Panel.

Parameters
Parameter Description
sHeaderText The text for the header area of the Accordion Panel control.

Return Value
The Accordion Panel container control created by the call.

Example
var accordionExample;
var panelOne;
var labelOne;
var panelTwo;

// Create Accordion
accordionExample = System.CreateObject("System.Controls.Accordion");
accordionExample.Initialize();

// Add panel one and a control
panelOne = accordionExample.AddPanel("Panel One");
ArrangePanels ()

Summary
The ArrangePanels method Forces the panel positions to update and arrange based on their expanded or contracted status. This method is called internally when a new control is added or the parent control is resized. The method is provided for utility only and does not need to be called under normal conditions.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var accordionExample;
var panelOne;
var labelOne;
var panelTwo;

// Create Accordion
accordionExample = System.CreateObject("System.Controls.Accordion");
accordionExample.Initialize();

// Add panel one and a control
panelOne = accordionExample.AddPanel("Panel One");
labelOne = accordionExample.AddControl("System.Controls.Label");
label.SetText("My New Label")

// Add empty panel two control
panelTwo = accordionExample.AddPanel("Panel Two");

// Force Arrangement
accordionExample.ArrangePanels();
 
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 the e-commerce platform built for flexibility