PDA

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



kchiu
17 Sep 2009, 12:17 AM
Hi,

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:

http://128.250.148.12:8080/examples/textareaForm.html

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.

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

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

Animal
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.

kchiu
18 Sep 2009, 1:31 AM
Hi,

Thanks a lot for the reply.

I've gone with border layout, and the full vertical spanning works now:
http://128.250.148.12:8080/examples/textareaForm2.html

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.