1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    5
    Vote Rating
    0
    Pompoen is on a distinguished road

      0  

    Default Answered: Viewport not using full screen

    Answered: Viewport not using full screen


    I'm learning from a book of Packt Publishing(http://www.packtpub.com/ext-gwt-20-beginners-guide/book) and one of the first things it addresses is the creation of a viewport and the attachment of that viewport to the rootpanel.

    Viewport viewport = new Viewport();
    RootPanel.get().add(viewport);

    This is all code. To see the viewport the stylesheet is adapted and .x-viewport is given a color.

    All well until the application is launched: The viewport is there but according to the book(and to the screenshot in it) the viewport should take up the whole screen. In my application there is a border of about 10px on the top and left side of the page, as if there is a margin.

    Am I forgetting something? I tried to set body{ margin: 0px 0px 0px 0px; } in the css but that did not have any result.
    I can continue the examples in the book but the border stays there ... staring at me ... annoying me ... waiting until I'm at my weakest ... and one day he will get the best of me .

    My specs:
    GWT 1.5.3
    GXT 2.2.4
    FireFox 3 and FireFox 4 (Safari 5.1 is not yet supported as the gwt plugin doesnt work there).

  2. There is another css loaded call clean.css which sets up the margin. Try to not inherit the clean gwt theme.

  3. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Answers
    60
    Vote Rating
    130
    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


    To see the viewport the stylesheet is adapted and .x-viewport is given a color.
    Is only the className added or is there realy something behind this rule? Have you included the gxt-all.css file to your page?

  4. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    5
    Vote Rating
    0
    Pompoen is on a distinguished road

      0  

    Wink


    The html:
    Code:
    <!doctypehtml><!-- The DOCTYPE declaration above will set the    -->
    <!-- browser's rendering engine into               -->
    <!-- "Standards Mode". Replacing this declaration  -->
    <!-- with a "Quirks Mode" doctype may lead to some -->
    <!-- differences in layout.                        -->
    
    
    <html>
    <head>
    <metahttp-equiv="content-type"content="text/html; charset=UTF-8">
    
    
    <linktype="text/css"rel="stylesheet"href="rssreader.css">
    <linktype="text/css"rel="stylesheet"href="gxt/css/gxt-all.css">
    
    
        <title>rssreader</title>
    </head>
    
    
    
    
    <body>
    <!-- <noscript>
          <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
            Your web browser must have JavaScript enabled
            in order for this application to display correctly.
          </div>
        </noscript> -->
    <divid="loading">
    <divclass="loading-indicator">
    <imgsrc="gxt/images/default/shared/large-loading.gif"
    				 width="32" height="32"/>Even geduld a.u.b.<br />
    			<span id="loading-msg">Bezig met laden...</span>
    </div>
    </div>
    <scripttype="text/javascript"src="rssreader/rssreader.nocache.js"></script>
    </body>
    </html>
    
    
    The css rssreader.css:
    .x-viewport
    {
    background-color: #ff0000;
    }

    The code rssreader.java:
    Code:
    	
    public void onModuleLoad() {		
    	Viewport viewport = new Viewport();
    	RootPanel.get().add(viewport);
    }

  5. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    5
    Vote Rating
    0
    Pompoen is on a distinguished road

      0  

    Default


    The result of the code(with the annoying whitespace in the browser window):

    Schermafbeelding 2011-09-13 om 12.34.31.jpg

  6. #5
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Answers
    60
    Vote Rating
    130
    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


    Can you please upload your example somewhere, in a compiled format, so everyone could access it over http?

  7. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    5
    Vote Rating
    0
    Pompoen is on a distinguished road

      0  

    Default


    You can find a deployed example on http://immotropolis.appspot.com

    btw: tested with i.e. 8 and got the same result

  8. #7
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Answers
    60
    Vote Rating
    130
    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


    There is another css loaded call clean.css which sets up the margin. Try to not inherit the clean gwt theme.

  9. #8
    Sencha User
    Join Date
    Sep 2011
    Posts
    5
    Vote Rating
    0
    Pompoen is on a distinguished road

      0  

    Default


    And how do I not inherit the clean gwt theme? Probably in one of the xml's.

    I guess that it is solved then, I'll try it this evening .

  10. #9
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Answers
    60
    Vote Rating
    130
    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


    In the modulename.gwt.xml file where you also inherit the gxt module.

  11. #10
    Sencha User
    Join Date
    Sep 2009
    Posts
    1
    Vote Rating
    0
    Jurasec is on a distinguished road

      0  

    Talking


    Quote Originally Posted by sven View Post
    There is another css loaded call clean.css which sets up the margin. Try to not inherit the clean gwt theme.
    Thanks, its works!

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