1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    18
    Vote Rating
    0
    ninja is on a distinguished road

      0  

    Default Layout aligned centre horizontally

    Layout aligned centre horizontally


    I have a layout with fixed width. I want it to be aligned horizontally to the centre of the browser window. How can I achieve this with the existing GXT API?
    Any help woul be appreciated.
    Thanks.

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    set a CentreLayout on the container (ie viewport)

  3. #3
    Ext User
    Join Date
    Aug 2008
    Posts
    18
    Vote Rating
    0
    ninja is on a distinguished road

      0  

    Default


    I have already tried it. But the problem with the CentreLayout is that it aligns horizontally correctly, but in vertical direction, it contracts the page to a relatively small stripe at the top of the browser screen. So it does not work correctly.

  4. #4
    Ext User
    Join Date
    Aug 2008
    Posts
    18
    Vote Rating
    0
    ninja is on a distinguished road

      0  

    Default


    More closely, my layout hierarchy is the following:
    1.viewport - centrelayout
    1.1.contentpanel - fitlayout
    1.2.1.verticalpanel
    1.2.1.1.htmlcontainer
    1.2.1.2.toolbar
    1.2.1.3.contentpanel - borderlayout - called mainview
    1.2.1.3.1.verticalpanel (on the west)
    1.2.1.3.2.contentpanel (in the centre)

    In case of using a centrelayout, the content below the toolbar becomes invisible, perhaps because mainwiew has no exact height, it is expected to occupy the free region entirely, but unfortunatelly, it does not.
    If I removed the centerlayout, the page displayed correctly, but it is not aligned to the centre.
    Last edited by ninja; 11 Sep 2008 at 11:37 PM. Reason: Lost indentation

  5. #5
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    yes, you would need to size the panel for center layout to work - another option is to just use a normal table layout and size the table cell yourself... (center layout is just a table layout without any sizing - its 100%)

  6. #6
    Ext User
    Join Date
    Aug 2008
    Posts
    18
    Vote Rating
    0
    ninja is on a distinguished road

      0  

    Default


    But I don't know how.

  7. #7
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    post some code

  8. #8
    Ext User
    Join Date
    Aug 2008
    Posts
    18
    Vote Rating
    0
    ninja is on a distinguished road

      0  

    Default


    Can I send you the code to your private email address?

  9. #9
    Ext User
    Join Date
    Sep 2008
    Posts
    3
    Vote Rating
    0
    piprog is on a distinguished road

      0  

    Default Demo project?

    Demo project?


    H gslender,

    I have a very similar problem. I'd need a layout practically the same as the extjs.com layout: fixed width content centered on the page, with a header, body and footer band, the header and footer fixed height, the body vertically stretching to the wishes of the actual content -- i.e. the most common web page layout.

    Would it be possible to create an "official" demo/sample that achieves this with the best performance? Since this is a very common use case, I think it would be to the benefit of the whole community.

    An additional issue is that I'd like to use a Table in the body and would like that table to grow/shrink accourding to the number of actual rows ;-)

    TIA,
    piprog

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar