You are here: Web Apps with Visual LANSA > 4. Designing your Web Application > 4.3 Responsive Design > 4.3.1 Layouts

4.3.1 Layouts

Layouts solve the problem of resizing or moving controls as the browser resizes.

Table Layouts divide the page into a grid, the number of rows and columns is set by the user. Controls are positioned at a specific grid location and can be set up to resize within their allotted space and to move as the page size changes.

Multiple layouts can be created to target specific device sizes. For example, if the browser is resized to portrait rather than landscape, you might choose to arrange application pieces down the page rather than across. For LANSA, this is as easy as checking the height and width and applying the appropriate layout:

Evtroutine Handling(#Com_owner.SizeChanged)
If (#Com_Owner.Height > #Com_Owner.Width)
#Com_owner.LayoutManager <= #Layout1
#Com_owner.LayoutManager <= #Layout2

Layout Managers are an enormously powerful feature and further reading on the subject is encouraged. For more information, refer to Layout Managers in What the Application will look like in Creating Graphical User Interface Applications in the Visual LANSA Developer Guide.