-
29 Jul 2010 6:11 AM #1
Measuring height of siblings...
Measuring height of siblings...
Hello,
I have following problem. I need the script that will return me sum of heights of elements that are in the same container as control in parameter, ofcourse without this control.
For example I have container that contains 3 controls:
now what I need is to invoke method like:Code:GridPanel - height: 150px; SomeOtherPanel - height: 200px; Toolbar - height: 50px;
which will return me 250 to my siblingsHeightvariable.Code:var siblingsHeight = MesureSiblingsHeight(GridPanel)
How to write such method? Any examples? I've tried.. no success
-
29 Jul 2010 6:33 AM #2
I don't think you really need this.
I think you need to use a layout manager.
Like hbox or vbox, depending on your requirements. Which you have not specified.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
29 Jul 2010 7:08 AM #3
I'm not using extjs it directly, but throught the .net port called ext.net, and I'm not sure if standard solution will work, but anyway what I need is to have grid which will allways fill the gap between two panels (at the top, and at the bottom).
The panels could have diffrent height dependent of the form, so I don't know theirs heights. I need the grid to always be precisely big so the bottom toolbar will always stick to bottom panel and the headers bar always stick to top panel. The grid can have much more rows then it can be shown on the page - in this situation it must has scrollbar.
Also it have not to be extra containers and such because it will be used too many times, and i cannot make it abstract because its all on aspx pages.
What kind of layout can I use in extjs? I will adapt the solution to ext.net
Thanks in advice
-
29 Jul 2010 7:23 AM #4
That's a vbox layout using
Configure the top and bottom with a fixed height, and your grid in the middle withCode:layout: { type: 'vbox', align: stretch }, items: [ topPanelWithConfiguredHeight, gridPanelwithFlex_1, bottomPanelWithConfiguredHeight ]
Code:flex: 1
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
29 Jul 2010 8:00 AM #5
Bad news.. I cannot implement it like this in ext.net

The request for script that I asked about in my first post is still actual..
-
29 Jul 2010 9:18 AM #6
Why not? You have 3 components in a Container. The Container must have some layout. So use vbox. To do otherwise is to waste time. All these calculations are done for you.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
29 Jul 2010 9:51 AM #7
I'm using it, as I said, in ext.net.
Now vbox in ext.net does not accept items other then ext server controls. Problem is that some controls that I'm using are custom server controls and to use it I have to encapsulate them into some ext containers. When we multiply this operation by the ~30 pages that I have, the better way is to make one script that will compute heights and rest in piece
Similar Threads
-
Layouts for fixed height window containing tabpanel with panels with different height
By Otake in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 9 Dec 2009, 8:24 AM -
problem with minWidth/Height and maxWith/Height in resizable Object
By TAG in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 18 Aug 2009, 11:34 PM -
fit grid height to windows/viewport height
By dahool in forum Ext 2.x: Help & DiscussionReplies: 16Last Post: 12 Nov 2008, 6:20 AM -
Auto-height & Max-height combination not working
By acemaverick in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 12 Sep 2008, 8:48 AM


Reply With Quote