Free layout

Free layout example, that uses GridLayout element, is shown in List 102, and the corresponsing dialog is shown in Figure 62.

GridLayout, HBoxLayout, VBoxLayout can be used to layout widgets freely. When using these elements for layouting, caption attributes are not used to show labels, but Label elements are used to show labels instead.

GridLayout, HBoxLayout, VBoxLayout elements can be used recursively. GroupBox element can be used inside these elements freely.

List 102 Free layout definition example
 1<Tab name="roughness" caption="Roughness">
 2  <Item name="diam" caption="Diameter of uniform bed material (mm)">
 3    <Definition valueType="real" default="0.55" />
 4  </Item>
 5  <Item name="j_drg" caption="Bed roughness">
 6    <Definition valueType="integer" default="0">
 7      <Enumeration value="0" caption="Calculated from bed material"/>
 8      <Enumeration value="1" caption="Constant value"/>
 9      <Enumeration value="2" caption="Read from file"/>
10    </Definition>
11  </Item>
12  <GroupBox caption="Manning's roughness parameter">
13    <GridLayout>
14      <Label row="0" col="0" caption="Low water channel" />
15      <Item row="1" col="0" name="sn_l">
16        <Definition valueType="real" default="0.01" />
17      </Item>
18      <Label row="0" col="1" caption="Flood channel" />
19      <Item row="1" col="1" name="sn_h">
20        <Definition valueType="real" default="0.01" />
21      </Item>
22      <Label row="0" col="2" caption="Fixed bed" />
23      <Item row="1" col="2" name="sn_f">
24        <Definition valueType="real" default="0.01" />
25      </Item>
26    </GridLayout>
27  </GroupBox>
28  <Item name="snfile" caption="Input file for Manning's roughness">
29    <Definition valueType="filename" default="Select File" />
30  </Item>
31</Tab>
../_images/layout_complex.png

Figure 62 Dialog for free layout definition example