View Full Version : How to reverse the direction of collapsible/expandable behavior in ContentPanel

3 Aug 2014, 10:40 AM
Hi, The default behavior of the expansion/collapsible of ContentPanel is towards bottom of the page. In other words, when the expand icon is clicked on the content panel, the panel expansion happens towards bottom of the page, but, I would want this happen towards top of the page. I want to reverse the default direction of expansion/collapsible behavior, because I need to add the content panel in the bottom of the page.

Here is the sample code for default behavior:

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.sencha.gxt.widget.core.client.ContentPanel;
import com.sencha.gxt.widget.core.client.button.TextButton;
import com.sencha.gxt.widget.core.client.button.ToolButton;

public class CollapsePanelExample implements EntryPoint {

public void onModuleLoad() {
ContentPanel cp = new ContentPanel();
cp.setHeadingText("Content Panel");
cp.setPixelSize(250, 140);
cp.setPosition(10, 10);
cp.setWidget(new HTML("This is an HTML Widget in a ContentPanel."));
cp.addButton(new TextButton("Ok"));