PDA

View Full Version : Extjs4.0.7 treepanel autoheight issue



seamas
14 Mar 2012, 8:07 PM
The following is my code, why the autoheight is not working, i just see apart of treepanel

var CreateMenuPanel = function(TypeID,title){
return new Ext.tree.Panel
({
title: title,
autoHeight : true,
autoScroll : false,

rootVisible: false,
scroll: 'none',
height:300,
useArrows: true,
border : false,
collapsible:true,
});
};

mitchellsimoens
15 Mar 2012, 6:36 AM
There is no config autoHeight

seamas
15 Mar 2012, 10:04 PM
is there any other attribute or other way to instand of autoheight?

khmurach
16 Mar 2012, 1:08 AM
Hi! Will you place your menu in viewport?

seamas
16 Mar 2012, 1:13 AM
no, just renderTo a div
I was used following code still not working correct

this.getEl().setStyle('height', 'auto');
this.body.setStyle('height', 'auto');
this.getView().getEl().setStyle('height', 'auto');
this.doComponentLayout();

khmurach
16 Mar 2012, 1:36 AM
Here (http://ext4all.com/post/panel-with-left-side-tree-border-layout) is example for ext-app.
Do you have ext-app? Or it is html page with one ext control - Tree?

seamas
16 Mar 2012, 1:46 AM
yes, i have, but i can not have scroll in my treepanel


Can you tell my how to change the treepanel title style ? for example "simple tree" become red color

khmurach
16 Mar 2012, 1:55 AM
yes, i have, but i can not have scroll in my treepanel
Why you render your tree to a div? Why you don't use viewport or panel with border layout?

Can you tell my how to change the treepanel title style ? for example "simple tree" become red color
I'll try..

khmurach
16 Mar 2012, 2:31 AM
Can you tell my how to change the treepanel title style ? for example "simple tree" become red color
Demo here http://ext4all.com/post/how-to-change-the-treepanel-any-panel-title-style

seamas
16 Mar 2012, 2:58 AM
have follwoing you way

but i add the css into panel body , but header

x-panel x-tree-panel x-tree-arrows panel-with-my-header x-grid x-panel-default x-collapsed x-panel-collapsed x-panel-default-collapsed

seamas
16 Mar 2012, 3:19 AM
Thank you so much, it is working ,you are kindly guy

khmurach
16 Mar 2012, 3:58 AM
You are welcome! Follow my posts at http://ext4all.com/ :)

seamas
18 Mar 2012, 6:23 PM
But my project do not allow use viewport, I still been stuck in autoheight.

Just Extjs4.0 not have autoheight attribut.

khmurach
18 Mar 2012, 11:34 PM
Try border layout http://ext4all.com/post/panel-with-left-side-tree-border-layout

seamas
18 Mar 2012, 11:46 PM
Hi Khmaruch
Thank you so much,
but my layout like following picture
32873

khmurach
19 Mar 2012, 12:36 AM
http://ext4all.com/post/accordion-layout

seamas
19 Mar 2012, 12:57 AM
Hi Khmurach

My layout require open multi panel (open more than one panel at same time)

i used following config
layout: {
type: 'accordion',
multi: true,
fill: false
},

but the multi attribute look not work

seamas

khmurach
19 Mar 2012, 2:26 AM
Config option "Multi" do not works for me too.
How about styled tree (http://ext4all.com/post/extjs-4-treepanel-style-with-no-header)

seamas
9 Apr 2012, 11:39 PM
Hi khmurach

The following is my code function
forwardTo(url) {
var panel=Ext.create('Ext.ux.SimpleIFrame', {
id:'test1',
border: false,
src: url
});
var page=Ext.create('Ext.Panel', {
id:'iframeTest',
border: false,
header: false,
height: document.body.clientHeight-140,
layout: 'fit',
renderTo: 'innerpage',
items: panel
});
page.show();
page.on('resize',resizeIframe('iframeTest'));
}

function resizeIframe(iframeID) {
alert(iframeID);
if(self==parent) return false;
else if(document.getElementById&&document.all) /* Sniffs for IE5+.*/ var FramePageHeight = top.scrollHeight + 10;
var FramePageWidth = top.scrollWidth + 10;
alert(FramePageHeight);
parent.document.getElementById(iframeID).style.height=FramePageHeight;
parent.document.getElementById(iframeID).style.width=FramePageWidth;
}
when the user cilck left Menu, the forwardTo function will be called, Then the body area will be reflash
but The iframe in body area can not be resize when the window is not maximized

Thank you in advance