Hi again,

I see, that this produces some strange behaviors. I actually saw this yesterday
too, but I couldn't get what exactly you are "planning" to do with your
layout...
That's the reason why I assumed you might want to design it as I posted the
last time.
So, hmmm I still don't get it. Here are _my_ assumptions:
- You want the HorizontalBoxLayout to divide the whole window into a left and a
  right pane? (width : "50%").
- You want the left part be a (yellowish) CanvasLayout.

Do these "collide" with what you intended to do? ;)
I don't think so, 'cause than this discussion should have ended already ;)

I know that, once you get stick in the layouting, it is sometimes hard to
understand why some minor changes in one of the widgets do affect the layout.
Here's what I'm doing in that cases:
Back to paper and pen; draw the layout; re-implement it from scratch!
Sometimes this helped me ;)

/Kuddel

P.S.: Maybe we should continue this thread via personal mail and post only the
      conclusion here (once we got one).

-------- Original --------
From: Tobias Koller (GERMO GmbH)
Date: 28.06.2007 07:47

> Hi,
> 
>  
> 
> thanks for your answer but you made something wrong.
> 
>  
> 
> You put the f1 into f2 but you should put f2 into f1 (f1 is the horizontalBox 
> which makes the problems).
> 
>  
> 
> Here is your example which shows the "bug?".
> 
>  
> 
>  
> 
> qx.Class.define("app.test_n_debug.winTest",
> 
> {
> 
>   extend : qx.ui.window.Window,
> 
>  
> 
>   construct : function()
> 
>   {
> 
>     this.base(arguments, "Test", null);
> 
>     this.set(
> 
>     {
> 
>       height       : 300,
> 
>       width        : 300
> 
>     });
> 
>  
> 
>  
> 
>     var f1 = new qx.ui.layout.HorizontalBoxLayout;
> 
>     f1.set(
> 
>     {
> 
>       width : "50%",
> 
>       height : "100%",
> 
>       horizontalChildrenAlign: "center",
> 
>       left : 100,
> 
>       backgroundColor: "red"
> 
>     });
> 
>  
> 
>     var f2 = new qx.ui.layout.CanvasLayout;
> 
>     f2.set(
> 
>     {
> 
>       width : "100%",
> 
>       height : "100%",
> 
>       backgroundColor : "yellow"
> 
>     });
> 
>  
> 
>     this.add(f1);
> 
>     f1.add(f2);
> 
>  
> 
>     this.info(this.classname + " initialized");
> 
>   }
> 
> });
> 
> ----------------------
> 
>  
> 
> I put the HorizontalBoxLayout(f1) "left:100" so you can see the walking of 
> the yellow box(f2) if you resize the window at runtime.
> 
> The red box should always be covered by the yellow one, cause the yellow-box 
> is width:"100%".
> 
>  
> 
> Tobias
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Peter 
> Schneider
> Gesendet: Mittwoch, 27. Juni 2007 17:35
> An: qooxdoo Development
> Betreff: Re: [qooxdoo-devel] Bug in HorizontalBoxLayout??
> 
>  
> 
> Hi Tobias,
> 
>  
> 
> I think I don't understand exactly what you are trying to accomplish...
> 
> So here's my guess:
> 
> You try to build something like this...
> 
> +-------------+
> 
> |+-----+      |
> 
> || red |      |
> 
> |+-----+      |
> 
> +-------------+
> 
> ...where the red area is the H-Box?
> 
> Than this works fine for me:
> 
>  
> 
> ----------------- code ----------------------------
> 
>  
> 
> qx.Class.define("app.test_n_debug.winTest",
> 
> {
> 
>   extend : qx.ui.window.Window,
> 
>  
> 
>   construct : function()
> 
>   {
> 
>     this.base(arguments, "Test", null);
> 
>     this.set(
> 
>     {
> 
>       height       : "auto",
> 
>       width        : "auto"
> 
>     });
> 
>  
> 
>  
> 
>     var f1 = new qx.ui.layout.HorizontalBoxLayout;
> 
>     f1.set(
> 
>     {
> 
>       width : "50%",
> 
>       height : "100%",
> 
>       horizontalChildrenAlign: "center",
> 
>       backgroundColor: "red"
> 
>     });
> 
>     f1.add(new qx.ui.basic.Label("I am f1"));
> 
>  
> 
>     var f2 = new qx.ui.layout.CanvasLayout;
> 
>     f2.set(
> 
>     {
> 
>       width : "100%",
> 
>       height : "100%",
> 
>       backgroundColor : "yellow"
> 
>     });
> 
>     f2.add(new qx.ui.basic.Label("</br>I am f2",null,"html"));
> 
>  
> 
>     this.add(f2);
> 
>     f2.add(f1);
> 
>  
> 
>     this.info(this.classname + " initialized");
> 
>   }
> 
> });
> 
>  
> 
> ----------------- code-end ----------------------------
> 
>  
> 
> But if you're trying something completely different, I didn't get it ;)
> 
> In that case, feel free to contact me (directly).
> 
>  
> 
> /Kuddel
> 
>  
> 
> -------- Original --------
> 
> From: Tobias Koller (GERMO GmbH)
> 
> Date: 27.06.2007 16:46
> 
>  
> 
>> Hi Peter,
> 
> 
>> Of course I set f1.add(f2);
> 
>> that can't be the problem ;)
> 
> 
>> Tobias
> 
>> -----Ursprüngliche Nachricht-----
> 
>> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Peter 
>> Schneider
> 
>> Gesendet: Mittwoch, 27. Juni 2007 16:39
> 
>> An: qooxdoo Development
> 
>> Betreff: Re: [qooxdoo-devel] Bug in HorizontalBoxLayout??
> 
> 
>> Hi Tobias,
> 
> 
>> just in case:
> 
> 
>> you _did_ something like...
> 
> 
>> f1.add(f2);
> 
> 
>> ...didn't you?
> 
> 
>> If you forgot, it would explain the "walking" (at least to me).
> 
> 
>> /Kuddel
> 
> 
> 
>>> Hi,
> 
>>> [...]
> 
>>> I have a problem with the qx.ui.layout.HorizontalBoxLayout.
> 
> 
>>>  
> 
> 
>>> Here is my example:
> 
> 
>>>  
> 
> 
>>> var f1 = new qx.ui.layout.HorizontalBoxLayout;
> 
> 
>>> f1.set({
> 
> 
>>>       width : "50%",
> 
> 
>>>       height : "100%",
> 
> 
>>>       horizontalChildrenAlign: "center",
> 
> 
>>>       backgroundColor: "red"
> 
> 
>>> });
> 
> 
>>>             
> 
> 
>>> var f2 = new qx.ui.layout.CanvasLayout;
> 
> 
>>> f2.set({
> 
> 
>>>       width : "100%",
> 
> 
>>>       height : "100%",
> 
> 
>>>       backgroundColor : "yellow"
> 
> 
>>> }); 
> 
> 
> 
>>> When I start my application everything looks good. But when I resize the
> 
>>> browser-Window, the f2-box "walks" out of the f1-box.
> 
> 
>>>  
> 
> 
>>> There are two ways how the bug doesn't occur:
> 
> 
>>> 1.       I don't set f1-"horizontalChildrenAlign"
> 
> 
>>> 2.       Or I set f1-"width" to a fix width (f.e. 200)
> 
> 
>>>  
> 
> 
>>> What can I do?
> 
>>> [...]
> [...]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to