View Full Version : Collapsing a form with a seperate button

22 Feb 2010, 4:11 AM
Hi, I've recently been using Ext for an application and I've found it to be excellent so far.

I have a window which contains a Grid and a Form for storing/editing members. The form is collapsible and works fine when I press the collapse arrows, however I am trying to make it uncollapse when I click the 'Add Member' button.

I tried using:

myForm.collapse = false;

which did set collapse to false, but it did not actually uncollapse. I'm assuming there is a function call or some other way to do this. If someone could point me in the right direction I would be greatly appreciative.


22 Feb 2010, 4:22 AM

22 Feb 2010, 7:18 AM
In his own charming way (we all love you, Animal), I believe he was trying to say that the functions for animating "collapse() and expand()" (hint...hint...) can be found on the FormPanel docs page (look in the methods section instead of the configs).

22 Feb 2010, 2:42 PM
Thanks to both of you. myForm.expand(false) works fine (without animating of course), however if I set animating to true it screws up the layout of the window. I've attached a screenshot of what happens after calling myForm.expand(true).

The members form is supposed to be docked to the right of the window (region: 'east'). Any idea what could cause this? Again, this only happens when I call myForm.expand(true). Using the expand/collapse arrows does not have this problem.

23 Feb 2010, 12:21 AM
Not understand. What are you doing? What are you hoping for?

23 Feb 2010, 2:47 PM
The issue seems to have resolved itself. Nonetheless, I would still like to know what caused it. Attached is what the window should look like. The collapsable form is docked to the right of the window and does not have any whitespace to the right like the previous screen shot.