Complex Layout resizing Problems - Ext JS

Hi all,

I have created a complex layout for an application I am working on. Now when I resize the window, they layout breaks. I am most likely doing something wrong, but I can not seem to localize the problem maybe someone here can help?

You can see the layout under the following url:

http://www.fraley.de/yui/selection-alpha.html

Best regards
patrick
  # 2  
03-15-2007, 03:18 AM
URL

Hi all,

the URL was not working yesterday because the upload took a while, but it is working now. Can anyone help please?

Best regards
patrick
  # 3  
03-15-2007, 05:39 AM

What "breaks"?
  # 4  
03-15-2007, 05:51 AM

In the upper part there is a selectionframe with 4 parts (ZG1 thru ZG4) these parts are always supposed to be 25% of the usable width. after resizing (in Safari and FireFox, have not tested IE yet) they get scrambled and some of them don't even show anaymore.
  # 5  
03-15-2007, 06:43 AM

"supposed to be"?

What, you want the the browser to read your mind?

They're not being scrambled, just hidden if you make the window narrower!

If you want to divide up the width into 4 equal parts, you'll have to write some code to do that, and listen for resize events.
  # 6  
03-15-2007, 06:50 AM

hey come on my english is not the best.

and yes they are supposed to be, if you look at the code you will see that they are Ext.BorderLayouts with a width of 50% (since you can't divide into 4 equal parts I divide into two and then divide into two again). et voila 25% and since I gave them a size and they are BorderLayouts I would expect them to have a resize listender (works on other BorderLayouts so far), so I guess I expect them to read my mind, or at least stick to the code that came out of my mind

I am not new to JavaScript but new to this library, but as far as I understodd the BorderLayout it will resize them accordingly, maybe I missunderstodd something ....

If this does not work the way I expect, could you give me a hint on where to get some info on how to write an observer for the resizing problem???

thanks again
patrick
  # 7  
03-15-2007, 06:53 AM

You can't specify widths in %ages.
  # 8  
03-15-2007, 06:59 AM

mmhh ok, though except for the resizing problems it seems to work with the percent. I guess I will have to figure out another way of doing this ....

is there anywhere documentation on how to dynamically change the size of objects? and how to find the available space (I guess the size of the parent container would be something to start from ...)
  # 9  
03-15-2007, 07:12 AM

It would be a new type of Panel. I'd suggest a subclass of ContentPanel which has some kind of config which specifies multiple zones (horiz or vert) and their size (width or height depending on the orientation) as %ages.

It would have to set up a listener listening for the "layout" event of its parent layout, and redo all its calculations.

You could then have a getElement(n) method where n is the zone number - 0 to 3 in this case.

Sounds like a fun project.
  # 10  
03-15-2007, 07:19 AM

hey thanks I guess that points me in the right direction and is what I was thinking about doing eventually anyway's

I will post updates on it here, and maybe someone can use this. I guess it is kind of like the Mac Os X Browser or something. We will see what comes of it

你可能感兴趣的:(ext,IE,firefox,yui,Safari)