1. #1
    Ext User
    Join Date
    Mar 2010
    Posts
    48
    Vote Rating
    0
    mwmcmullen is on a distinguished road

      0  

    Default Window Not Displaying Correctly

    Window Not Displaying Correctly


    .. in both Firefox and Chrome.

    Using GXT 2.1.1 and GWT 2.0.3.

    In onModuleLoad() I'm doing a simple:
    Code:
    ContentPanel cp = new ContentPanel();
    cp.setSize(800, 600);
    cp.setPosition(0, 0);
    cp.setHeading("Some Stuff");
    OpeningWindow ow = new OpeningWindow();
    
    cp.add(ow);
    RootPanel.get().add(cp);
    cp.layout();
    Then that is calling :
    Code:
    public class OpeningWindow extends LayoutContainer 
    {
    	@Override
    	protected void onRender(Element parent, int pos)
    	{
    		
    		super.onRender(parent, pos);
    		
    		setLayout(new FlowLayout(10));
    		
    		final Window window = new Window();
    		window.setSize(800, 600);
    		window.setModal(true);
    		window.setPlain(true);
    		window.setBlinkModal(true);
    		window.setHeading("Configuration");
    		window.setLayout(new FitLayout());
    		
    		TabPanel panel = new TabPanel();
    		panel.setBorders(false);
    		TabItem item1 = new TabItem("ConfigTab1");
    		item1.addText("Hello....");
    		item1.addStyleName("pad-text.....");
    		
    		TabItem item2 = new TabItem("ConfigTab2");
    		item2.addText("..... World!");
    		item2.addStyleName("pad-text....");
    		
    		panel.add(item1);
    		panel.add(item2);
    		
    		window.add(panel, new FitData(4));
    		
    		window.addButton(new Button("Hello"));  
    		window.addButton(new Button("World"));  
    		
    		Button btn = new Button("Hello World", new SelectionListener<ButtonEvent>()
    		{
    			@Override  
    			public void componentSelected(ButtonEvent ce) 
    			{  
    				window.show();  
    			}  
    		});  
    		add(btn);
    		
    		
    	}
    
    }
    The content panel works nice, then when I hit "Hello World", the text that is supposed to display in a Window with modal enabled, etc isn't even working. It just shows up as out-of-place text beside the button and header.

    Can anyone seen what I'm doing wrong?

    P.S. I'm trying to work the 'Hello World' Window example in GXT's Explorer.

  2. #2
    Ext User
    Join Date
    Mar 2010
    Posts
    48
    Vote Rating
    0
    mwmcmullen is on a distinguished road

      0  

    Default


    Can anyone offer any advice? I still can't work out what I'm doing wrong.

  3. #3
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    The code looks ok and it is also workign for me. Do you get any error message? Are you sure you have loaded the gxt-all.css file?

  4. #4
    Ext User
    Join Date
    Mar 2010
    Posts
    48
    Vote Rating
    0
    mwmcmullen is on a distinguished road

      0  

    Default


    Quote Originally Posted by sven View Post
    The code looks ok and it is also workign for me. Do you get any error message? Are you sure you have loaded the gxt-all.css file?
    I don't get any error messages, all compiles nicely. Then I get:

    http://tinypic.com/r/2wh1rmr/5

  5. #5
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You have not loaded the css file.

  6. #6
    Ext User
    Join Date
    Mar 2010
    Posts
    48
    Vote Rating
    0
    mwmcmullen is on a distinguished road

      0  

    Default


    Quote Originally Posted by sven View Post
    You have not loaded the css file.
    Could you please advise how I would do this? This is my first time playing with GXT therefore any help would be most appreciated.

  7. #7
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Inside the download there is a setup.txt file. It contains all informations you need to know.

  8. #8
    Ext User
    Join Date
    Mar 2010
    Posts
    48
    Vote Rating
    0
    mwmcmullen is on a distinguished road

      0  

    Default


    Quote Originally Posted by sven View Post
    Inside the download there is a setup.txt file. It contains all informations you need to know.
    I cannot find any setup.txt file in the downloaded jar.

  9. #9
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You have not downloaded the jar alone. You downloaded afull archive. That also containes images and css files that you need http://www.extjs.com/products/gxt/download.php

  10. #10
    Ext User
    Join Date
    Mar 2010
    Posts
    48
    Vote Rating
    0
    mwmcmullen is on a distinguished road

      0  

    Default


    Quote Originally Posted by sven View Post
    You have not downloaded the jar alone. You downloaded afull archive. That also containes images and css files that you need http://www.extjs.com/products/gxt/download.php
    Works like a charm. Thank you very much, Sven.

Thread Participants: 1