1. #11
    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


    Cool, works great. Thank you!

    ...but as it is still a workaround, I hope this is on the todo list for GXT 2.0!

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

      0  

    Default


    There is a better way that works in all directions.

    Notes:
    - The window may open outside the container so you need to control the opening position.
    - The window position is relative to the browser
    E.g. if you collapse a west panel and there are windows in a center panel then the windows won't move and can be rendered out of the constraining container

    Sven - I think this should be how the window's draggable should be in the code base (rather than just the window's title bar) - your thoughts?


    Code:
            
    
        private class ConstrainedWindow extends Window {
            private Container constrainContainer = null;
            ConstrainedWindow(Container<Component> constrainContainer)
            {
                this.constrainContainer = constrainContainer;
            }
            
            @Override
            protected void afterRender()
            {
                super.afterRender();
                // Disable existing draggable adding one for whole window using existing handle
                getDraggable().setEnabled(false);
                Draggable d = new Draggable(this, getDraggable().getDragHandle());
                d.setContainer(constrainContainer);
            }
        };
    Usage:
    Code:
         ConstrainedWindow w = new ConstrainedWindow(constrainContainer);
    Last edited by The_Jackal; 7 Apr 2009 at 8:35 PM. Reason: update

  3. #13
    Ext User sjzaluk's Avatar
    Join Date
    Apr 2008
    Posts
    40
    Vote Rating
    0
    sjzaluk is on a distinguished road

      0  

    Default


    Has this been implemented in 2.0 M1? I can't seem to get it to work yet without this workaround. I thought Window.setConstrain(true) would do it but it's still not working for me.

    Thanks,
    Steve

  4. #14
    Ext GWT Premium Member
    Join Date
    Aug 2008
    Posts
    47
    Vote Rating
    0
    xalvaro is on a distinguished road

      0  

    Default


    +1

    in 2.0 ?

    Especially for the Desktop in order to have the taskbar always on top

  5. #15
    Ext User
    Join Date
    Apr 2009
    Posts
    36
    Vote Rating
    0
    ApacheLogs is on a distinguished road

      0  

    Exclamation desktop migration

    desktop migration


    i have a problem in migration to 3.0
    i have occured many problems in migration to 3.0.there's any one who have migrate desktop whith success ??

  6. #16
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    Quote Originally Posted by ApacheLogs View Post
    i have a problem in migration to 3.0
    i have occured many problems in migration to 3.0.there's any one who have migrate desktop whith success ??
    fyi, this is the GXT forum.