1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    24
    Vote Rating
    0
    poporogue is on a distinguished road

      0  

    Default problem in LayoutContainer alignment

    problem in LayoutContainer alignment


    Hi
    I have written a GXT application and i want to place the gxt object with center alignment in the browser.
    However, i have tried with setStyleAttribute, it fails.
    Then i set the style name to the container and do it in the css file included in the html, it fails too.

    So what can i do to make it center?

    Here is my simple code.

    Code:
    LayoutContainer container = new LayoutContainer();        
     container.setStyleAttribute("margin", "10px");
    container.setLayout(new FlowLayout());
    container.setSize(800, 600);
    container.setBorders(true);
    container.setStyleName("formPainter_main");
    
    RootPanel.get().add(container);
    Thanks

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,717
    Vote Rating
    107
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    How do you want to center it? Your code does not contain any logic to center it. Which rules do "formPainter_main" assign to it?

Similar Threads

  1. Replies: 1
    Last Post: 6 Sep 2010, 9:11 AM
  2. problem the display grids & forms in LayoutContainer
    By yous in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 21 Jul 2009, 3:18 AM
  3. GXT 1.1.3 Problem using FitLayout with LayoutContainer
    By edfimasa in forum Ext GWT: Help & Discussion (1.x)
    Replies: 3
    Last Post: 22 Nov 2008, 12:07 PM
  4. alignment problem
    By albert.sole in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 6 May 2008, 3:20 AM