Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Posts
    139
    Vote Rating
    4
    jvahabzadeh is on a distinguished road

      0  

    Default A help forum for Ext GWT 3.0? For now, questions with Window...

    A help forum for Ext GWT 3.0? For now, questions with Window...


    I know it's still at DP 5 and not officially released - but I'm completely new (ie: less than a week experience) to GXT, so, started with 3.0, since we're using GWT 2.4 and if we start using GXT, will do so with 3.0.

    I do have some questions, though, and these might well be due to the fact that I don't know what I'm doing - but couldn't find an appropriate Q&A forum for 3.0.... nor do I fully know if my questions are 3.0-specific. My apologies, therefore, for the extreme-newbie questions.

    So, I guess I'll start with a few simple ones.

    - I've been doing some initial playing around with the Window class. If I
    1. Create a Window
    2. Add a VerticalLayoutPanel to it
    3. Add several Labels to the VerticalLayoutPanel
    4. Show the window
    it sizes itself to be large enough to acommodate all its contents.
    However, if I do the same thing with a BorderLayoutPanel in the Window instead, when I show the Window, it starts out small and I have to manually stretch it (or explicitly give it a size).

    How do I get this to auto-size to accommodate the contents correctly? I know I'm comparing apples and oranges here, but is there something in the Window class that causes behavior similar to using pack() in Swing's JFrame class?


    - In the example mentioned above where I add a few Labels to the VerticalLayoutPanel, then subsequently add the VerticalLayoutPanel to the Window, I notice that the titlebar and border of the Window has the same background color as the main window itself, thus you can't really tell where the titlebar/border ends and the main window begins. Is this supposed to be like this, or am I doing something wrong?

    - Minimize - on a Window, when I do setMinimizable(true), I get the minimize icon in the title bar of the Window, as expected. However, it does nothing. I guess this is because the Window must be inside of some other component (and thus have a minimize icon somewhere, etc). But inside of what? How do I work with this? I see the Window as being the equivalent maybe of Swing's JInternalFrame, but what should contain the Window?

    Thanks in advance...

  2. #2
    Software Architect
    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


    How do I get this to auto-size to accommodate the contents correctly? I know I'm comparing apples and oranges here, but is there something in the Window class that causes behavior similar to using pack() in Swing's JFrame class?

    Some layouts required to be sized manually. BorderLayoutContainer is one of them. You will need to either set a size on this one, or size the Window itself.


    Minimize - on a Window, when I do setMinimizable(true), I get the minimize icon in the title bar of the Window, as expected. However, it does nothing. I guess this is because the Window must be inside of some other component (and thus have a minimize icon somewhere, etc). But inside of what? How do I work with this? I see the Window as being the equivalent maybe of Swing's JInternalFrame, but what should contain the Window? <
    You need to implement the logic that should happen. GXT cannot know what you want to happen when the user minimizes the window. You can listen to the Minimize event of the window and there do you own logic.

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2011
    Posts
    139
    Vote Rating
    4
    jvahabzadeh is on a distinguished road

      0  

    Default


    Thanks.

    A further question - and clarification on my border/titlebar question.

    I have done the following in my code:
    1. Create a Window containing a HorizontalLayoutPanel, which in turn contains a Label.
    2. Create a Window containing a VerticalLayoutPanel, which in turn contains a Label.
    3. Create a Window containing a BorderLayoutPanel - each of its directions and the center all contain a Label.
    In all three cases, the background color of the LayoutPanel is the same as the background color of the Window titlebar and border.

    However, ONLY for the 3rd case, if I manually resize the Window, the background color of the LayoutPanel changes to a lighter shade - thus making it distinguishable from the titlebar and border.

    Is this a bug, or something I am doing wrong? I would have assumed that the LayoutPanel would have a different color for the background by default. How do I get the different color for the LayoutPanel area to happen by default without the need to resize, and to get it to happen with all LayoutPanel types?

    I have no .css files or styles added via my own code - I am looking only at the default colors.

    Thanks again in advance.

  4. #4
    Software Architect
    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


    However, ONLY for the 3rd case, if I manually resize the Window, the background color of the LayoutPanel changes to a lighter shade - thus making it distinguishable from the titlebar and border.
    Only BorderLayoutPanel on its own sets a different background color. The others do not set a color at all. Take a look at it with Firebug and you will see.

Thread Participants: 1