blob: b92a21e44e267f4ab56e3fd851e422ca7d212a44 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<TITLE>
ColumnLayout
</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>
ColumnLayout</H1>
<p>Another custom layout in UI Forms is a variation of the <code>RowLayout</code>.
If we configure <code>RowLayout</code> to place children vertically (in
columns), and to make all controls the same with within the column, we would get
several columns (depending on the width of controls), but the last column would
typically not be completely filled (depending on the number of controls). Again,
if placed in a form, we would get all the controls in one column because <code>
RowLayout</code> cannot do 'vertical' wrapping. If we use <code>GridLayout</code>,
we must choose the number of columns up front and live with the choice.</p>
<p>There are situations in more complex forms where we want the number of
columns to be adaptive. In other words, we would like the number to change
depending on the width of the form - use more when possible, drop the number
down as the width decreases. We would also like to fill the form area more-less
equally (with all the columns roughly the same height). All this can be achieved
with <code>ColumnLayout</code>.</p>
<p>Compared to <code>TableWrapLayout</code>, <code>ColumnLayout</code> is much
simpler. Hardly any configuration is needed. The only choice you need to make is
the range of columns you want to have (default is 1 to 3).</p>
</BODY>
</HTML>