Hi,

no, the Grid layout only allows one widget per cell. I'd do something 
like this:

gridContainer.add(image1, {row: 0, column: 1});
gridContainer.add(image2, {row: 1, column: 0});
gridContainer.add(image3, {row: 1, column: 3});
gridContainer.add(image4, {row: 3, column: 1});

Sort of like a good, old-fashioned HTML table. Not sure if that's what 
you need, though.


Regards,
Daniel


Jean-Noël Rivasseau schrieb:
> Hi and thanks for the reply,
> 
> A Grid layout with only one cell then?
> 
> Jean-Noel
> 
> On Wed, May 27, 2009 at 10:03 AM, Daniel Wagner <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     Hi Jean-Noël,
> 
>     I may well be wrong here, but from my understanding, the alignX/Y
>     properties only work if the parent layout arranges its children in a
>     cell-like structure. From what I can see, apart from Dock only HBox,
>     VBox and Grid support them.
> 
>     I'd use a Grid layout to achieve what you're trying to do, but that
>     doesn't mean there isn't a more elegant solution ;-)
> 
> 
>     Regards,
>     Daniel
> 
>     Jean-Noël Rivasseau schrieb:
>      > Hello,
>      >
>      > I have a simple Composite widget (container) and I want to place
>     4 images:
>      >
>      > * first is centered horizontally and at top vertically
>      > * second is centered horizontally and at bottom vertically
>      > * third is left horizontally and centered vertically
>      > * fourth is right horizontally and centered vertically
>      >
>      > I wanted to use alignX and alignY for this.
>      >
>      > The docs say:
>      >
>      > Horizontal alignment of the item in the parent layout.
>      >
>      > Note: Item alignment is only supported by LayoutItem
>      > <http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.LayoutItem>
>      > layouts where it would have a visual effect. Except for Spacer
>      > <http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Spacer>, which
>      > provides blank space for layouts, all classes that inherit LayoutItem
>      > <http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.LayoutItem>
>      > support alignment.
>      >
>      >
>      > Composite inherit LayoutItem, so it should be OK. However,
>     without any
>      > Layout on the Composite, (or a Basic Layout, or a Canvas layout)
>     it does
>      > not work. The only solution I have found was to use a Dock layout for
>      > this, but isnt there a simpler solution? Eg, the docs seem to say any
>      > layout support alignX and alignY, but in effect, it seems no layout
>      > support them at all!...
>      >
>      > Am I doing something wrong?
>      >
>      > Jean-Noel
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      >
>     
> ------------------------------------------------------------------------------
>      > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>      > is a gathering of tech-side developers & brand creativity
>     professionals. Meet
>      > the minds behind Google Creative Lab, Visual Complexity,
>     Processing, &
>      > iPhoneDevCamp as they present alongside digital heavyweights like
>     Barbarian
>      > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > qooxdoo-devel mailing list
>      > [email protected]
>     <mailto:[email protected]>
>      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
>     
> ------------------------------------------------------------------------------
>     Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>     is a gathering of tech-side developers & brand creativity
>     professionals. Meet
>     the minds behind Google Creative Lab, Visual Complexity, Processing, &
>     iPhoneDevCamp as they present alongside digital heavyweights like
>     Barbarian
>     Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 
> 
> 
> -- 
> Jean-Noël Rivasseau
> Shoopz - Lead Developer / Responsable Développement
> http://www.shoopz.com/
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to