SplitPane remove form

Hi

In the SplitPabe I can add left and right forms (or top and buttom forms). Can I also remove them? Add null? Like tabPanel.removeAllTabs()?

We add these left and right forms dynamically to the SplitPane. In some cases we only need to display one form. So we want to remove the left form and add a right form only. The resizeWeight is 0, so we expect the right form to take all of the space.

Thank you for any help. Regards.

no, you can’t remove, only replace, and you can hide the left form with :
dividerLocation = 0;
dividerSize = 0;

Thank you.
Kind regards

why don’t you just not use the splitpanel when you want to hide?

If you store the current state: Hide/Show in a global var, you just let your navigation method decide where to put the form.
That’s how we worked around it.

Of course it depends on your framework if this can be implemented really easy or not…

Actually that’s what I did now. I use a SplitPane and a ‘normal’ TabPanel. One is invisible. But it is good to hear how others solve the requirements. I don’t want to miss a good feature :)

Thanks and regards
Birgit

Hi all,

Maybe I’m missing something:

I’m tring to substitute the right-form into my SplitPane but when I try this with the code:

elements.tabs_main.setRightForm(forms.testMe)

than I obtain this error:

Can’t find method com.servoy.j2db.smart.dataui.SpecialSplitPane.js_setRightForm(com.servoy.j2db.FormController)

All the solution forms are design-form.

Thanks in advance

Marco

Ok,was a very stupid things:

instead of:

elements.tabs_main.setRightForm(forms.testMe)

I must specify the null value for the relation-paramether:

elements.tabs_main.setRightForm(forms.testMe,null)

I leave here this post for others that will meet this strange issue :)
I thought that ,because there’s no relation ,I could omit the relation-paramether.