PDA

View Full Version : TabItem - Layout and Scrolling Issue



joeyjbarrett
29 May 2009, 8:06 AM
Using GXT 2.0-m2

I have tried many combinations to layout the content of my TabItem and enable scrolling.

General structure:

Window (BorderLayout)
|_TabPanel (Region Center)
|_TabItem (Tried: Flow, Fit, Border)
|_ContentPanel (ColumnLayout)
|_Tree (ColumnData .5)
|_Grid (ColumnData .5)

Code (action listeners removed):


final ContentPanel panel = new ContentPanel();
panel.setLayout(new ColumnLayout());
panel.setHeading("Columns");
panel.setBodyBorder(false);
panel.setScrollMode(Scroll.AUTOX); /* tried AUTO, AUTOX, ALWAYS (which makes a grayed out scroll bar) */

// a subclass of EditorGrid used as a wrapper for editing properties
// exactly like the version in EXT JS
// It has no predefined formating (height, scrolling, etc...) in the class
final PropertyGrid columnPropertiesGrid = new PropertyGrid();
columnPropertiesGrid.setAutoHeight(true);

VColumnTree columnTree = new VColumnTree(tableID);

panel.add(columnTree, new ColumnData(.5));
panel.add(columnPropertiesGrid, new ColumnData(.5));

TabItem tab = new TabItem();
tab.setClosable(true);
tab.setBorders(false);

//tab.setLayout(new FitLayout());
//tab.setScrollMode(Scroll.AUTOX);

tab.add(panel);
tabPanel.add(tab);
/* tried all these */
//tabPanel.syncSize();
//tab.layout();
//tabPanel.recalculate();


Screen shot:
http://lh3.ggpht.com/_YWpkNWrkFu8/SiAGsymDxNI/AAAAAAAABSU/aVTlqcMltME/s800/screenshot.jpg

Thank you in advance for any help,
Joey J. Barrett