I'm not very good at HTML/CSS terminology so please feel free to edit the question.
Could you guys please tell me how I can make certain fields/tags fill rest of available space allocated by parent tag ? Non-GWT, html+css example would be fine too.
Here is what I have
HTML code of this example is here (it's generated by GWT).
If I change size of the browser window border of fieldset changes too occupying whole area.
So the "requirements" are:
UiBinder XML of PersonEditor control is
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:e='urn:import:com.google.gwt.editor.ui.client'
ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat'
ui:generateKeys="com.google.gwt.i18n.server.keygen.MD5KeyGenerator"
ui:generateLocales="en,ru">
<ui:style src="../common.css"/>
<g:CaptionPanel ui:field="captionPanel">
<g:Grid>
<g:row>
<g:cell>
<div>
<ui:msg meaning="person's name">Name:</ui:msg>
</div>
</g:cell>
<g:customCell>
<e:ValueBoxEditorDecorator ui:field="name" stylePrimaryName="{style.editField}">
<e:valuebox>
<g:TextBox width="100%" stylePrimaryName="{style.editField}"/>
</e:valuebox>
</e:ValueBoxEditorDecorator>
</g:customCell>
</g:row>
<g:row>
<g:cell>
<div>
<ui:msg>Phone Number:</ui:msg>
</div>
</g:cell>
<g:customCell>
<e:ValueBoxEditorDecorator ui:field="phoneNumber" stylePrimaryName="{style.editField}">
<e:valuebox>
<g:TextBox width="100%" stylePrimaryName="{style.editField}"/>
</e:valuebox>
</e:ValueBoxEditorDecorator>
</g:customCell>
</g:row>
<g:row>
<g:cell>
<div>
<ui:msg>EMail:</ui:msg>
</div>
</g:cell>
<g:customCell>
<e:ValueBoxEditorDecorator ui:field="email" stylePrimaryName="{style.editField}">
<e:valuebox>
<g:TextBox width="100%" stylePrimaryName="{style.editField}"/>
</e:valuebox>
</e:ValueBoxEditorDecorator>
</g:customCell>
</g:row>
</g:Grid>
</g:CaptionPanel>
</ui:UiBinder>
I don't provide XML for SenderOrganization because it's pretty much the same.
To make label column be autosizable you have to use table element. It looks like this:
<!DOCTYPE HTML>
<html>
<head>
<style>
table { width: 100%; }
th { text-align: left; font-weight: normal; white-space: nowrap; }
td { width: 100%; }
input { width: 100%; }
</style>
</head>
<body>
<fieldset>
<legend>Sender organization:</legend>
<table>
<tr>
<th>Name:</td>
<td><input></td>
</tr>
<tr>
<th>Address:</td>
<td><input></td>
</tr>
</table>
<fieldset>
<legend>Contact Person:</legend>
<table>
<tr>
<th>Name:</td>
<td><input></td>
</tr>
<tr>
<th>Phone Number:</td>
<td><input></td>
</tr>
<tr>
<th>EMail:</td>
<td><input></td>
</tr>
</table>
</fieldset>
</fieldset>
</body>
</html>