1. #1
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    70
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default HorizontalLayoutContainer and VerticalLayoutContainer absolute positioning

    HorizontalLayoutContainer and VerticalLayoutContainer absolute positioning


    I see that both HorizontalLayoutContainer and VerticalLayoutContainer are set to be positionable in their constructor. This makes these containers override settings received from their parent container. For example, I use a CssFloatLayoutContainer with several HorizontalLayoutContainers, where the size of these inner containers are known. I want these inner containers to be positioned below eachother, but the relative positioning set by the CssFloatLayoutContainer are overriden by the HorizontalLayoutContainer element style set in the constructor. The result is that all these inner containers overlap eachother.

    Is this intentional, and am I using these containers wrong?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    There is no specific reason you *can't* put HLC/VLCs inside of a CssFloatLC, though I'd question the use case (and probably agree with you once you made your case, though I might suggest an alternative as well). I'll investigate this as part of EXTGWT-3727, which is the CssFloatLC margin issue.

    CssFloatLC, by design, does not assign a height. HLC/VLC require a height (also requires a width, but it is at least *possible* for CssFloatLC to assign a width). This means that you need to assign a height (and optionally a width, depending on how the CssFloat data is set up) to the HLC, in addition to any layout data that will be used. If the goal is to get the HLCs to float around each other, this is probably the cleanest way to do it, otherwise I'd look into nesting in a VLC instead (but again, asking the VLC to assign a height), or consider HBoxLC or GWT's HorizontalPanel if you want the children to decide their own sizes.

  3. #3
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    70
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default


    You are absolutely right. I'm using only the width from CssFloatLayoutContainer with CssFloatData size=1. When laying out the HorizontalLayoutContainer, I set the height manually. I managed to get this working with the current codebase using a custom appearance for CssFloatLayoutContainer where I've added "position: relative;" to the child class.

  4. #4
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    70
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default


    I should also point out that I needed more detailed control over how wide each column in the horizontal layout should be, and this is not supported in nether HBoxLayoutContainer nor HorizontalPanel.

Thread Participants: 1