I'm trying to create new windows using the addWindow function but I'm
not using the mdiCanvas instance created with MXML. The window is
created but it seems to be fixed at a particular x coordinate but can
move horizontally and resize. I can add another window but it puts it
underneath the first window and I can't move it from that location.
Can anyone please let me know what I need to add to fix it? It doesn't
matter whether I have the views added or not. Here's the code:

private function addWindow():void
                        {       
                        
                        var mdiCan:MDICanvas = new MDICanvas();
                        mdiCan.percentHeight = 100;
                        mdiCan.percentWidth = 100;
                        mdiCan.horizontalScrollPolicy = "off";
                        mdiCan.verticalScrollPolicy = "off";
                        var win:MDIWindow = new MDIWindow();
                        win.width = 650;
                        win.height= 700;
                        win.title = "Window + 
String(mdiCan.windowManager.windowList.length
+ 1);
                        win.x= 50;
                        win.y = 100;
                        win.addChild(new RSTView());
                        win.addChild(new DataGridView());
                        win.addChild(new SliderSearchView());
                        mdiCan.windowManager.add(win);
                        addChild(mdiCan);
                                
                        }



Reply via email to