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

Summary
An Accordion Panel control that represents on panel within the Accordion parent control. This object should not be created directly but instead be created by the parent Accordion control's AddPanel method.

Example
var accordionExample;
var panelOne;

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

// Add panel one and a control
panelOne = accordionExample.AddPanel("Panel One");
Methods
Initialize AddControl SetHeaderText GetHeaderText GetClientArea SetExpanded GetExpanded

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. Please note the Initilize method of the Accordion Panel does not need to be called directly as it is called by the AddPanel method of the Accordion control.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var accordionExample;
var panelOne;

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

// Create Accordion
panelOne = System.CreateObject("System.Controls.AccordionPanel", accordionExample);
panelOne.Initialize();
AddControl (sControlType)

Summary
The AddControl method offers a simple way to add a control, by type, to an Accordion panel. The given type is created, added, initialized and resized specifically for the panel.

Parameters
Parameter Description
sControlType The full type name of the control to be created.

Return Value
The resulting control created by the call.

Example
var accordionExample;
var panelOne;
var labelOne;

// 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");
SetHeaderText (sHeaderText)

Summary
The SetHeaderText method changes the text displayed in the panel header area that is clicked to contract or expand the panel.

Parameters
Parameter Description
sHeaderText The new header text to be set for this panel.

Return Value
This method does not return a value.

Example
var accordionExample;
var panelOne;

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

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

// Change the header text
panelOne.SetHeaderText("Changed Header");
GetHeaderText ()

Summary
The GetHeaderText method returns the text displayed in the panel header area that is clicked to contract or expand the panel.

Parameters
This method has no parameters.

Return Value
The current header text set for this panel.

Example
var accordionExample;
var panelOne;

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

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

// Show the header text
System.MessageBox("Header Text Displayed", panelOne.GetHeaderText());
GetClientArea ()

Summary
The GetClientArea method returns the control representing the panel's actual body area. This is the area where child controls can be added to the panel that will be hidden when contracted. Adding to the actual control will prevent them from being hidden when the panel contracts and can be used to cover over the header area.

Parameters
This method has no parameters.

Return Value
The client area, contracting panel, of the control.

Example
var accordionExample;
var panelOne;
var labelOne;

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

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

// Manual control creation using client area
labelOne = System.CreateObject("System.Controls.Label", accordionExample.GetClientArea());
label.Initialize();
label.Move(0, 0);
label.Resize(accordionExample.GetClientArea().GetWidth(), 24);
label.SetText("My New Label")
SetExpanded (bExpanded, bSkipArrange)

Summary
The SetExpanded method changes the expanded status of this Accordion panel. Setting to true will expand this panel and contract all other, whilst setting to false will contract the panel and leave all other panels unchanged.

Parameters
Parameter Description
bExpanded The new expanded status to be set for this panel.
bSkipArrange Optionally specifies if the call should skip the panel arrangement, default is false.

Return Value
This method does not return a value.

Example
var accordionExample;
var panelOne;

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

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

// Change the expanded state
panelOne.SetExpanded(true);
GetExpanded ()

Summary
The GetExpanded method returns the current expanded state of this Accordion panel. If the panel is expanded the method will return true otherwise it will return false.

Parameters
This method has no parameters.

Return Value
The current expansion state set for this panel.

Example
var accordionExample;
var panelOne;

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

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

// Show the current state
System.MessageBox("Expanded State", panelOne.GetExpanded().toString());
 
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