...besides that this might be a bug (can anyone responsible for it make a
comment on this?), here's my work-around idea:

I had come across this problem a while ago myself. I wanted to have a widget,
that is 20% wide and stays horizontal centered. I worked around that by placing
two "HorizontalSpacer"s to the left and right of the widget to be centered.
In "our" example this would be:

f1.add(new qx.ui.basic.HorizontalSpacer, f2, new qx.ui.basic.HorizontalSpacer);

Here's a qote from the HorizontalSpacer docs, explaining what is done:
> [...]
> By default it tries to occupy the all the remaining space by setting a
> flex width of <code>1*</code>
> [...]

I'm not 100% sure if this might help you in your special case, but maybe
someone else in this forum can get some gain out of this workaround.

/Kuddel

P.S.: By the way...nice looking GUI you're working on. I like the
      style/theme/appearance.

-------- Original --------
From: Tobias Koller (GERMO GmbH)
Date: 28.06.2007 13:00

> ;)
> Yes, it's a general problem of using flex sizes inside a HorizontalBoxLayout 
> (horizontalChildrenAlign: center).
> I guess this would also be a problem in other widgets which are able to 
> center its children (f.e. qx.ui.basic.Atom).
> 
> So, I would say it's a bug...
> 
> Tobias
> 
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Peter 
> Schneider
> Gesendet: Donnerstag, 28. Juni 2007 12:10
> An: qooxdoo Development
> Betreff: Re: [qooxdoo-devel] Bug in HorizontalBoxLayout??
> 
>> Ok,
>>
>> I will explain it to you :D
>>
>> I created my own buttonBar-class (myapp.bar.Bar - it's a 
>> horizontalBoxLayout).
>> There I can define buttons (myapp.bar.Button), Title (myapp.bar.Title) , 
>> icons (myapp.bar.Icon) which should be centered in my buttonBar.
>>
>> Usually my buttons have a fix size (100px or something like this) but if I 
>> create buttons with a flex size (f.e. 30%) this would
>> cause the problems ("walking widgets") I wrote before.
>>
>> I added 2 screenshot of my "myapp.page"-Widget which contains a 
>> TitleBar(myapp.bar.Bar + myapp.bar.Title + myapp.bar.Icon) 
>> and a buttonbar (myapp.bar.Bar + 2x myapp.bar.Button).
>> one with the flex size and one with a fix size.
>>
>>
>> Tobias 
>>
>> [...]
> 
> Ahhhh! Now I see :-D "...one picture says more than thousand words..."
> 
> But unfortunately I can't give you a quick solution :(
> The problem seems to be the
>     horizontalChildrenAlign : "center"
> part of the h-box.
> Without this setting, there's no "walking", but that's not what you intended 
> to
> design*...
> The inner widget gets a offset on the "left" property on resizing, only when
> the "horizontalChildrenAlign" property is set to "center".
> 
> I'm not sure if this is an error of the h-box. It is "a kind of" explainable,
> 'cause the widget is trying to center itself by adding an offset to its "left"
> property.
> Maybe this _is_ an issue.
> 
> I will take my lunch break now, maybe afterwards I'll have any idea for a
> work-around ;)
> 
> /Kuddel
> 
> *) ...if I get you right now ;)
> 
> [...]


-------------------------------------------------------------------------
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