Version

GetGridBagConstraint Method (UltraGridBagLayoutPanel)

Gets the Infragistics.Win.Layout.GridBagConstraint which contains the constraints for the specified control.
Syntax
'Declaration
 
Public Function GetGridBagConstraint( _
   ByVal control As Control _
) As Infragistics.Win.Layout.GridBagConstraint
public Infragistics.Win.Layout.GridBagConstraint GetGridBagConstraint( 
   Control control
)

Parameters

control
Control managed by the component.

Return Value

The grid bag constraint for the specified control
Remarks

The Infragistics.Win.Layout.GridBagConstraint exposes properties that are used to determine how/where the control should be positioned and includes properties such as Infragistics.Win.Layout.GridBagConstraint.OriginX, Infragistics.Win.Layout.GridBagConstraint.OriginY, Infragistics.Win.Layout.GridBagConstraint.SpanX and Infragistics.Win.Layout.GridBagConstraint.SpanY. The OriginX and OriginY are used to determine the location at which the control will be positioned. The SpanX and SpanY determine the number of logical columns and rows that the control will occupy. Together these indicate the logical cells that the control will occupy.

The GridBagConstaint available for each control also provides additional properties to control the size of the logical cells that the control will occupy. For example, the Infragistics.Win.Layout.GridBagConstraint.WeightX and Infragistics.Win.Layout.GridBagConstraint.WeightY are used to determine how the excess horizontal and vertical space respectively is distributed amongst the controls. The Infragistics.Win.Layout.GridBagConstraint.Insets property is used to indicate how much padding should exist around the control.

The GridBagConstaint also includes two properties that control how the control is positioned within the logical cells it occupies. The Infragistics.Win.Layout.GridBagConstraint.Anchor property is used to indicate which edge of the logical cells that the control should align with. The Infragistics.Win.Layout.GridBagConstraint.Fill property determines which dimensions, if any, should be resized based on the corresponding width/height of the logical cells.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also