Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Question on opening a new toplevel window

    Hi,
    I am opening a new window, which contains a treegrid on the left and a set of tabs on the right organized in a HLayout. When a leaf tree node is selected on the left, some html text is displayed in a new tab within the TabSet. I am having two problems. I cannot close the root node in the treegrid on the left, and I cannot switch between tabs or close tabs on the right... here is a code snippet of how I open a new window and create the various components. Any help is appreciated.

    thanks,



    Here is the code that opens the HLayout

    Code:
    HLayout resultsPanel = new HLayout();
            resultsPanel.setWidth100();
            resultsPanel.setHeight100();
            resultsPanel.setShowEdges(true);
            resultsPanel.setMembersMargin(5);
            resultsPanel.setLayoutMargin(20);
    Here is the tree grid:
    Code:
    /* Now create a TreeGrid object */
    		TreeGrid treeGrid = new TreeGrid();
    		/*treeGrid.setWidth(300); treeGrid.setHeight(400);*/
    		TreeGridField field = new TreeGridField("Name", "Paths");  
    		field.setCanSort(true); 
    		//field.setCanFilter(true);
    		treeGrid.setFields(field);  
    		treeGrid.setData(tree);
    		treeGrid.setShowAllRecords(true);
            treeGrid.setLoadDataOnDemand(false);
            treeGrid.setWidth("10%");
            treeGrid.setShowResizeBar(true);
            resultsPanel.addMember(treeGrid);
    Here is the code that creates the TabSet.

    Code:
    /* make the main tabs where the results are displayed */
            final TabSet pathTabs = new TabSet();
            pathTabs.setTabBarPosition(Side.TOP);
            pathTabs.setTabBarAlign(Side.LEFT);
            pathTabs.setHeight100();
            resultsPanel.addMember(pathTabs);
    and finally here is the code that opens a new window.


    Code:
                                   final Window win = new Window();
    		
    		/* make it modal, disable minimize and close buttons */
    		win.setShowMinimizeButton(true);
    		win.setShowCloseButton(true);
    		win.setAutoSize(true);
    		win.setAutoCenter(true);
    		win.setCanDragReposition(true);
    		win.setCanDragResize(true);
    
               win.setWidth(1200); win.setHeight(800);
            win.setTitle("Paths");
            win.addChild(resultsPanel);
    
            win.show();
    Last edited by ceeeed; 23 Dec 2010, 11:48.
Working...
X