1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Dhaka, Bangladesh
    Posts
    28
    Vote Rating
    0
    Answers
    1
    tanvirr is on a distinguished road

      0  

    Default Answered: Problem with Layour

    Answered: Problem with Layour


    Hi Friends,

    Right now i am facing a problem with layout. Please look at the attached file. layout_fit.jpg there you see the 2 red circles one is left side and another one is top. It look's like break the layout and does not fit with full screen. I am using GXT 3.0.1. Here is my code.
    PHP Code:
    public class Layout implements IsWidget {        public Widget asWidget(){                SelectionHandler<Itemheadler = new SelectionHandler<Item>() {
                @
    Override            public void onSelection(SelectionEvent<Itemevent) {                MenuItem item = (MenuItemevent.getSelectedItem();                Info.display("Action""You Seleted the: " item.getText());            }        };                final BorderLayoutContainer container = new BorderLayoutContainer();        container.setBorders(false);                Viewport viewport = new Viewport();        viewport.add(container);                Menu menu = new Menu();        menu.addSelectionHandler(headler);                MenuItem newItem = new MenuItem("New");        menu.add(newItem);                MenuItem openFileItem = new MenuItem("Open File");        menu.add(openFileItem);                Menu subMenu = new Menu();        subMenu.addSelectionHandler(headler);                subMenu.add(new MenuItem("readme.txt"));        subMenu.add(new MenuItem("hellow.txt"));        openFileItem.setSubMenu(subMenu);                MenuBar bar = new MenuBar();        bar.addStyleName(ThemeStyles.getStyle().borderBottom());                bar.add(new MenuBarItem("File"menu));                MenuBarItem edit = new MenuBarItem("Edir"subMenu);        bar.add(edit);                        ContentPanel top = new ContentPanel();        ContentPanel center = new ContentPanel();        center.setHeadingText("Work Space");                center.setResize(false);                BorderLayoutData topData = new BorderLayoutData();        topData.setMargins(new Margins(0));                MarginData centerData = new MarginData();                container.setNorthWidget(toptopData);        container.setCenterWidget(centercenterData);                        NorthSouthContainer menuBarContainer = new NorthSouthContainer();        menuBarContainer.setWidget(bar);                top.add(menuBarContainer);                return container;    }    } 
    How I can fit the layout with full screen?

  2. Dear friend thank you so much for your help. It's working.

  3. #2
    Sencha User
    Join Date
    Jan 2011
    Location
    Lima, Peru
    Posts
    43
    Vote Rating
    5
    Answers
    5
    poseidonjm is on a distinguished road

      0  

    Default


    You should return viewport instead container

    and add a reset.css file to your html page
    <link type="text/css" rel="stylesheet" href="reset.css">
    http://www.sencha.com/examples/explorer/reset.css

  4. #3
    Sencha User
    Join Date
    May 2011
    Location
    Dhaka, Bangladesh
    Posts
    28
    Vote Rating
    0
    Answers
    1
    tanvirr is on a distinguished road

      0  

    Default


    Dear friend thank you so much for your help. It's working.

Thread Participants: 1

Tags for this Thread