-
11 Dec 2012 2:49 AM #1
TreePanel sometimes looks collapsed (height not set?)
TreePanel sometimes looks collapsed (height not set?)
Very occasionally, a TreePanel which is used in software I've built does not have the correct height.
Screen Shot 2012-12-11 at 11.45.20 AM.png
This only happens in Chrome and Windows XP. It doesn't happen all of the time. I used several machines with the same setup and only some of them have this problem.
The code of the treepanel is this:
When I have the same treepanel working and I useCode:var ouTreePanel = new Ext.tree.TreePanel({ id: 'ou-tree-panel' ,layout: 'fit' ,frame: false ,border: false ,autoScroll: false ,rootVisible: false ,root: ouRoot ,loader: ouLoader ,listeners: { 'click': selectOrganization } });
it looks the same as in the screenshot. This gives me the impression it has something todo with the layout.Code:Ext.get('ou-tree-panel').setHeight(1);
Any help is really appreciated!
-
12 Dec 2012 2:54 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
What is the parent of the treepanel like? Also, you shouldn't change the layout of the treepanel.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
7 Jan 2013 1:24 AM #3
I had a similar problem. it seems it happens, when the panel is initially collapsed, thus not rendered and height not set. i solved it by adding an event which does the layout again. You still have a little lag but it works.
PHP Code:...
listeners: {
expand : function(p) {
p.doLayout();
}
}
...
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26


Reply With Quote