CoolLayout.NET Softcomplex Logo

CoolLayout.NET Documentation

Table of Contents

Description

CoolLayout.NET a native pure C# written .NET component designer to use with any winforms control container (System.Windows.Forms.Form for example). CoolLayout.NET alters the sizes and positions of controls on forms as they are sized. This gives your applications resolution independence. Design applications at one resolution and run them at a different resolution. Controls remain proportional in size to the forms on to the other controls and located relatively as you have specified it at design time. CoolLayout.NET does this without requiring you to write any code, just place CoolLayout.NET component on your form (any control container can be not exactly the form) point the designer which controls should be relatively positioned or sized and relatively to what.

Features

System Requirements

Installation and Testing

Please follow steps below to install CoolLayout.NET component

  1. Read Terms and Conditions and proceed to next steps only if you agree to them
  2. Check if your system meets requirements
  3. Download the component and unzip *.msi file
  4. Launch the CoolLayout.NET.msi from within the Windows Explorer or execute msiexec.exe /I CoolLayout.NET.msi manually from the console
  5. Follow instructions of the installer
  6. Launch your Microsoft Visual Studio .NET IDE
  7. Position your mouse over the toolbox*. Click your right mouse button and select "Add Tab" option from activated popup menu. Give the newly created tab some meaningful name. We would recommend "CoolLayout.NET" as this is the name we will be referring to in our further documentation
  8. Make the "CoolLayout.NET" pane active by clicking on its caption. Click your right mouse button and select "Customize Toolbox" option from activated popup menu. On the appeared dialog box switch to the ".NET Framework Components" page. Find and check the components from the CoolLayout.Windows.Forms.dll then click "Ok"
  9. Enjoy comfortable form design!
*Please refer to the Visual Studio.NET Help system to find out what the toolbox is and what it is used for

Layout concept

When you place CoolLayout.NET on you form it extends all controls with the following properties:

Layout Properties

With these properties you have the full control over the size and layout of the form’s controls.

Layout properties description

Property Description Valid values
HorizontalPositioning Specifies how control is positioned horizontally Center – control is center positioned relatively to its container
Relative – control positioned relatively to some other control (set with properties: LeftOrigin, RightOrigin)
VerticalPositioning Specifies how control is positioned vertically Center – control is center positioned relatively to its container
Relative – control positioned relatively to some other control (set with properties: TopOrigin, BottomOrigin
WidthMode Specifies how the width of the control is calculated Fixed – the width of the control is  fixed as to the value specified in control’s property box unless both LeftOriginMode and RightOriginMode are specified
Relative – the width of the control is calculated relatively as the width of the origin control is changed
WidthOrigin Specifies control that is used as origin when WidthMode is specified as Relative (see item above) Any valid control from the selection box
HeightMode Specifies how the height of the control is calculated Fixed – the height of the control is  fixed to the value specified in control’s property box unless both TopOriginMode and BottomOriginMode are specified
Relative – the height of the control is calculated relatively as the height of the origin control is changed
HeightOrigin Specifies control that is used for origin when HeightMode is specified as Relative (see item above) Any valid control from the selection box
LeftOriginMode Specified how left edge of the control is aligned when HorizontalPositioning is set as Relative Left – left edge of the control is aligned to the left edge of the origin control
Center – left edge of the control is aligned to the center of the origin control
Right – left edge of the control is aligned to the right edge of the origin control
None – No alignment for the left edge of the control
LeftOrigin Specifies control that is used as origin for the LeftOriginMode setting (see item above) Any valid control from the selection box
RightOriginMode Specified how right edge of the control is aligned when HorizontalPositioning is set as Relative Left – right edge of the control is aligned to the left edge of the origin control
Center – right edge of the control is aligned to the center of the origin control
Right – right edge of the control is aligned to the right edge of the origin control
None – No alignment for the right edge of the control
RightOrigin Specifies control that is used as origin for the RightOriginMode setting (see item above) Any valid control from the selection box
TopOriginMode Specified how top edge of the control is aligned when VerticalPositioning is set as Relative Top – top edge of the control is aligned to the top edge of the origin control
Center – top edge of the control is aligned to the vertical center of the origin control
Bottom – top edge of the control is aligned to the bottom of the origin control
None – No alignment for the top edge of the control
TopOrigin Specified how top edge of the control is aligned when VerticalPositioning is set as Relative Any valid control from the selection box
BottomOriginMode Specified how bottom edge of the control is aligned when VerticalPositioning is set as Relative Top – bottom edge of the control is aligned to the top edge of the origin control
Center – bottom edge of the control is aligned to the vertical center of the origin control
Bottom – bottom edge of the control is aligned to the bottom of the origin control
None – No alignment for the bottom edge of the control
BottomOrigin Specified how bottom edge of the control is aligned when VerticalPositioning is set as Relative Any valid control from the selection box

Sample Layout

Sample Form
PropertyValue
ListView1
TopOriginForm1
TopOriginModeTop
BottomOriginForm1
BottomOriginModeBottom
 
ListView2
LeftOriginListView1
LeftOriginModeRight
RightOriginForm1
RightOriginModeRight
 
Button1, Button2, Button3
RightOriginForm1
RightOriginModeRight
 
Combobox1
WidthOriginTabControl1
WidthModeRelative
LeftOriginListView1
LeftOriginModeRight
TopOriginListView2
TopOriginModeBottom
 
Combobox2
LeftOriginCombobox1
LeftOriginModeRight
RightOriginForm1
RightOriginModeRight
TopOriginListView2
TopOriginModeBottom
 
TabCnotrol1
LeftOriginListView1
LeftOriginModeRight
TopOriginListView2
TopOriginModeBottom
RightOriginForm1
RightOriginModeRight
BottomOriginForm1
BottomOriginModeBottom
 
TextBox1
LeftOriginTabPage1
LeftOriginModeLeft
RightOriginCobbox3
RightOriginModeLeft
 
Combobox3
LeftOriginTabPage1
LeftOriginModeRight

Links and References