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

Summary
An control grid alows controls to be grouped together and automatically arranged in a grid either by number of rows and columns or using a cell size variable for the controls. The following layout modes are supported by the control: LAYOUT_GRID (0) LAYOUT_SPECIFIC_GRID (1)

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Set layout mode
controlGridExample.Move(0, 0);
controlGridExample.Resize(512, 24);
controlGridExample.SetLayout(controlGridExample.LAYOUT_GRID);
Methods
Initialize SuspendLayout ResumeLayout ArrangeLayout GetLayout SetLayout GetPadding SetPadding GetRows SetRows GetColumns SetColumns SetCellWidth SetCellHeight GetCellWidth GetCellHeight

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

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();
SuspendLayout ()

Summary
Prevents the arrange layout event from being thrown when a resize occurs or a new control is added. This can be used to improve performance when adding a large number of controls.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Suspend layout
controlGridExample.SuspendLayout();

// Add controls

// Suspend layout
controlGridExample.ResumeLayout();
ResumeLayout ()

Summary
Causes the arrange layout event to resume being thrown when a resize occurs or a new control is added. This can be used to improve performance when adding a large number of controls.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Suspend layout
controlGridExample.SuspendLayout();

// Add controls

// Suspend layout
controlGridExample.ResumeLayout();
ArrangeLayout ()

Summary
Forces a rearrange of the controls on the grid. 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 controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Force arrange
controlGridExample.ArrangeLayout();
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 controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Get layout mode
System.Messagebox("Default Layout Mode", controlGridExample.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 grid.

Return Value
This method does not return a value.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

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

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

Parameters
This method has no parameters.

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

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Get padding
System.Messagebox("Default Padding", controlGridExample.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 grid.

Return Value
This method does not return a value.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Set padding
controlGridExample.Move(0, 0);
controlGridExample.Resize(512, 24);
controlGridExample.SetPadding(8);
GetRows ()

Summary
Gets the number of rows in the grid.

Parameters
This method has no parameters.

Return Value
The current number of rows supported by the grid.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Get row count
System.Messagebox("Default Row Count", controlGridExample.GetRows();
SetRows (iRows)

Summary
Sets the number of rows in the grid and forces a rearrange.

Parameters
Parameter Description
iRows The number of rows in the grid.

Return Value
This method does not return a value.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Set rows
controlGridExample.SetRows(8);
GetColumns ()

Summary
Gets the number of columns in the grid.

Parameters
This method has no parameters.

Return Value
The current number of columns supported by the grid.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Get column count
System.Messagebox("Default Column Count", controlGridExample.GetColumns();
SetColumns (iColumns)

Summary
Sets the number of columns in the grid and forces a rearrange.

Parameters
Parameter Description
iColumns The number of columns in the grid.

Return Value
This method does not return a value.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Set columns
controlGridExample.SetColumns(8);
SetCellWidth (iWidth)

Summary
Sets the specific width of a cell with the grid for use in the grid specific layout mode.

Parameters
Parameter Description
iWidth The width of a cell within the grid.

Return Value
This method does not return a value.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Set cell width
controlGridExample.SetCellWidth(8);
SetCellHeight (iHeight)

Summary
Sets the specific height of a cell with the grid for use in the grid specific layout mode.

Parameters
Parameter Description
iHeight The height of a cell within the grid.

Return Value
This method does not return a value.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Set cell height
controlGridExample.SetCellHeight(8);
GetCellWidth ()

Summary
Returns the width of a cell within the grid.

Parameters
This method has no parameters.

Return Value
The width of a cell within e grid.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Get cell width
System.Messagebox("Default Cell Width", controlGridExample.GetCellWidth();
GetCellHeight ()

Summary
Returns the height of a cell within the grid.

Parameters
This method has no parameters.

Return Value
The height of a cell within e grid.

Example
var controlGridExample;

// Create Command Strip
controlGridExample = System.CreateObject("System.Controls.ControlGrid");
controlGridExample.Initialize();

// Get cell height
System.Messagebox("Default Cell Height", controlGridExample.GetCellHeight();
 
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.
Exbos Ltd providing Bespoke Software Design and Build in Leeds and West Yorkshire for the whole of the UK