Using grids to for the layout of Controls in UIQ applications

in
Platforms:
Keywords:

gridweb.gifControls can be positioned in different ways on a drawable surface. One method is to give the coordinates directly for each control. In this way the controls can be put in arbitrary positions on the surface.

However, it is often convenient to use a separate component for the layout of controls, since the layout often has a pattern. One example of such a layout is the grid. The following example application shows an example of a grid class that can be used to position controls in an easy-to-use manner.

The screen shot on the right shows the running application. In this application, there are three levels of grids. The first level has 3x4 grid cells, and position (0,1) is further divided into a 2x2 grid. In this grid, position (1,0) is also divided in a 2x2 grid. The outmost grid is larger than the screen, and therefore a CQikScrollableContainer has been used to enable scroll bars. This makes the application behave like a spreadsheet.

Read the full article on Sony Ericsson web site.

Download the source code: grid.zip
grid.zip