Layout Managers

A layout manager is a controller that arranges user interface components within a window. It sets the location and size of all the components based on a predefined set of constraints. In Visual Studio a user interface component is called a control and the window is called a form. In Java there is a rich collection of layout managers available that include Grid Layout, Border Layout, Box Layout, Spring Layout, Flow Layout and Table Layout. Visual Studio 2005 comes with the basic Grid Layout, Flow Layout and Table Layout.

Many of these layout manager use some properties of the underlying controls to drive the layout algorithms. These properties are minimum size, maximum size, preferred size, margins and padding. Most of these properties are available in Java and .NET 2. Rapid Layout .NET synthesizes them for .NET 1.

Rapid Layout is revolutionary

Rapid Layout is revolutionary because it combines the features of many existing layout managers. In addition it provides a powerful but simple user interface that empowers the developer to graphically build the constraints needed. Rapid Layout is so flexible that developers can avoid creating nested layouts. The means that their code becomes simpler and therefore easier to understand and maintain.

Grid Layout

Grid Layout is a layout manager that gives the user direct control over user interface components. It allow the developers to place each control exactly where they want and with the size they specify. The drawback with the grid layout is that it is difficult to align components, controls do not rearrange themselves when the forms are resized and the forms often have to be completely redesigned when new items are added. Good results can be achieved with grid layouts but it can take a long time and can be difficult for graphically challenged developers who are in a hurry. With Visual Studio 2005 the grid layout was greatly enhanced with the addition of snap lines that allow a developer to quickly align all the components on a their form at design time only.

Rapid Layout .NET has all the advantages of grid layout and allows the developer to still take advantage of snap lines. Rapid Layout adds the ability to maintain alignment when the user interface is modified and at run time when the form is resized, the language is changed or the font styles are updated.

Border Layout or Docking containers

Visual Studio has a feature to dock controls to the center, top, bottom, left, right of the current container. This is similar to the Java border layout. This layout is useful for putting toolstrips at the top of a form, status bars and buttons on the bottom or navigation elements on the side. The border layout gives the maximum space possible to the central control while make sure the controls docked to the edges are all visible. This is useful when there is one control docked in each position but usually means that the toolstrips, status bar or navigation items are nested in another user control. As soon as the developer tries to dock more than one control to a side it becomes difficult to manage because the position is based on the stacking order.

Rapid Layout .NET has all the advantages of the border layout but also allows multiple items to be added to any of the docking locations.

Table Layout

Table layouts recognize that most Spacial Arrangements have table like structure to them. Table layout lets the developer create a number of rows and columns to form table cells where controls can be placed. Cells can be merged to create a rich variety of arrangements. Table layouts are used extensively in web pages to control both the main spacial arrangements and the arrangement of menus and graphical adornments. While the table layout is very powerful it can be restrictive in that the controls have to be aligned to the main arrangement. Developers often end up with tables nested inside other tables. This can become complicated and makes the visual designer difficult to operated,

Rapid Layout .NET has all the advantages of the table layout but also allows the developer have other controls placed without being constrained to the the table. It usually possible to create any user interface that is needed without having to nest layout panels.

Box Layout

The box layout is commonly available layout that is popular with XML based user interface languages. It allows you to connected user interface components together horizontally or vertically. The components can be made to stretch in the chosen direction to fill the available space. The box layout is one dimensional but it is possible to create the illusion of a two dimensional layout by nesting box layouts of different directions inside each other. Table type layouts can easily be created in a similar way.

Rapid Layout .NET has all the advantages of the box layout but also allows the developer to connect objects in two dimensions and gives complete freedom to make extra connections across multiple boxes. Users of Rapid Layout can also avoid having to resort to nested layouts to achieve the desired results.


HomeFeatures / The Layout Manager /