XML User Interface Library

Group boxes and combo boxes

The groupbox is exactly same as the box element, just have the label. As you see it is possible to pre-fill the combo boxes with the items. Also look at the <spacer /> element. It is just an empty space. You can use the spacer to make the empty cell in table.


Source code:

<?xml version="1.0" encoding="utf-16"?>
<!DOCTYPE dialog SYSTEM "xuilib.dtd">
<dialog orient="vertical" caption="Home Address dialog">
    <groupbox orient="horizontal" columns="2" label="Home Address" hFlex="1">
        <label value="Address:"/>
        <textbox id="home_address" hFlex="1"/>
        <spacer/>
        <textbox id="home_address2"/>
        <label value="City:"/>
        <textbox id="home_city"/>
        <label value="State/Province:"/>
        <box orient="horizontal">
            <textbox id="home_state"/>
            <label value="ZIP/Postal Code:"/>
            <textbox id="home_zip"/>
        </box>
        <label value="Country:"/>
        <textbox id="home_country"/>
        <label value="Post office box:"/>
        <textbox id="home_pobox"/>
    </groupbox>
    <groupbox orient="horizontal" columns="3" label="Phones">
        <label value="Phone Type"/>
        <label value="Phone"/>
        <label value="Phone notes"/>
        <combobox id="phonetype1" editable="false" sorted="true">
            <listitem value="0" label="Primary"/>
            <listitem value="1" label="Home phone"/>
            <listitem value="2" label="Work phone"/>
            <listitem value="3" label="Fax"/>
            <listitem value="4" label="Pager"/>
            <listitem value="5" label="Mobile"/>
        </combobox>
        <textbox id="phone1"/>
        <textbox id="phonenote1" hFlex="1"/>
        <combobox id="phonetype2" editable="false" sorted="true">
            <listitem value="0" label="Primary"/>
            <listitem value="1" label="Home phone"/>
            <listitem value="2" label="Work phone"/>
            <listitem value="3" label="Fax"/>
            <listitem value="4" label="Pager"/>
            <listitem value="5" label="Mobile"/>
        </combobox>
        <textbox id="phone2"/>
        <textbox id="phonenote2"/>
        <combobox id="phonetype3" editable="false" sorted="true">
            <listitem value="0" label="Primary"/>
            <listitem value="1" label="Home phone"/>
            <listitem value="2" label="Work phone"/>
            <listitem value="3" label="Fax"/>
            <listitem value="4" label="Pager"/>
            <listitem value="5" label="Mobile"/>
        </combobox>
        <textbox id="phone3"/>
        <textbox id="phonenote3"/>
    </groupbox>
</dialog>