View Full Version : how to get tabbed textarea to span remaining form height?

17 Sep 2009, 12:17 AM

I have a form with a fieldset and a tabpanel where each tab is a text area. Is there a way to make the tabpanel span the remaining height of the form? I'm using viewport as well:

As you can see, the tab panel currently only spans 4 lines of text, whereas I'd like to have it span the remaining height of the form.

Any idea how to do that?

thanks, cheers.

PS. Sorry for not pasting the code (it's visible from the above link): the forum edit box doesn't let me paste for some reason.

17 Sep 2009, 12:23 AM
Use a border layout.

Your FieldSet is the north, and the TabPanel is the center.

17 Sep 2009, 12:25 AM
Or a vbox layout. But then you'd have to handle calling doLayout after collapsing the FieldSet, and you wouldn't get splittability which border layout offers.

18 Sep 2009, 1:31 AM

Thanks a lot for the reply.

I've gone with border layout, and the full vertical spanning works now:

I do have a question though: given my form has the following requirements:

provide buttons and status bar at form bottom
auto validate the 'fieldset' and turn on a 'save' button at form bottom only when form is valid
update status bar based on success / failure of 'save' request

is the way I did it too heavy? (Panel containing a FormPanel with Fieldset (north) and a TabPanel (south))

There are other issues too; I'll open another thread for those.

thanks again, cheers.