Hybrid View

  1. #1
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Posts
    222
    Vote Rating
    1
    The_Jackal is on a distinguished road

      0  

    Default [1.2.3] Can't constrain window with container

    [1.2.3] Can't constrain window with container


    Hi,

    The following code won't constrain a window within a container.
    I have seen examples using ExtJS, so either my code is wrong, there's a bug, or GXT can't do this yet.

    If there is another way to do this, please guide me in the right direction.

    Code:
        
        public void onModuleLoad()
        {
            ContentPanel center = new ContentPanel();
            center.add(new Html("Center"));
            center.setSize(400, 400);
            
            ContentPanel west = new ContentPanel();
            west.add(new Html("West"));
            west.setSize(100, 400);
            
            HorizontalPanel main = new HorizontalPanel();
            main.add(west);
            main.add(center);
            
            Window w = new Window();
            w.setSize(200, 200);
            w.setConstrain(true);
            w.setContainer(center.getElement());
            w.show();
        }
    Regards,
    The Jackal

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,703
    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


    The container is only for maximazing the window. Not for dragging.

  3. #3
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Posts
    222
    Vote Rating
    1
    The_Jackal is on a distinguished road

      0  

    Default


    Hi,

    I've see this done in ExtJS - for example in Saki's http://examples.extjs.eu

    The panel/window -> Simple Window/Panel auto load example the window is limited to the center panel (see pic).

    Can this be done in GXT?

    Regards,
    Carl.
    Attached Images

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,703
    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


    EXTJs is not exactly the same than GXT. I move this into the help forum.

  5. #5
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,703
    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


    I look into adding this for the GXT2.0 release.

  6. #6
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Posts
    222
    Vote Rating
    1
    The_Jackal is on a distinguished road

      0  

    Default


    Thanks Sven.

  7. #7
    Ext GWT Premium Member takayser's Avatar
    Join Date
    Oct 2008
    Location
    Lucerne, Switzerland
    Posts
    188
    Vote Rating
    0
    takayser is an unknown quantity at this point

      0  

    Default


    +1