Changes in / [951701c:a97aebd] in sasview


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/data_panel.py

    rc8e1996 rcb1e9a5  
    520520        Add a listcrtl in the panel 
    521521        """ 
    522         tree_ctrl_label = wx.StaticText(self, -1, "Data") 
    523         tree_ctrl_label.SetForegroundColour('blue') 
    524         self.tree_ctrl = DataTreeCtrl(parent=self, style=wx.SUNKEN_BORDER) 
     522        # Add splitter 
     523        w, h = self.parent.GetSize() 
     524        splitter = wx.SplitterWindow(self) 
     525        splitter.SetMinimumPaneSize(50) 
     526        splitter.SetSashGravity(1.0) 
     527 
     528        file_sizer = wx.BoxSizer(wx.VERTICAL) 
     529        file_sizer.SetMinSize(wx.Size(w/13, h*2/5)) 
     530        theory_sizer = wx.BoxSizer(wx.VERTICAL) 
     531        theory_sizer.SetMinSize(wx.Size(w/13, h*2/5)) 
     532 
     533        self.tree_ctrl = DataTreeCtrl(parent=splitter, style=wx.SUNKEN_BORDER) 
     534 
    525535        self.tree_ctrl.Bind(CT.EVT_TREE_ITEM_CHECKING, self.on_check_item) 
    526536        self.tree_ctrl.Bind(CT.EVT_TREE_ITEM_MENU, self.on_right_click_data) 
     
    557567        wx.EVT_MENU(self, self.editmask_id, self.on_edit_data) 
    558568 
    559         tree_ctrl_theory_label = wx.StaticText(self, -1, "Theory") 
    560         tree_ctrl_theory_label.SetForegroundColour('blue') 
    561         self.tree_ctrl_theory = DataTreeCtrl(parent=self, 
     569        self.tree_ctrl_theory = DataTreeCtrl(parent=splitter, 
    562570                                             style=wx.SUNKEN_BORDER) 
    563571        self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_CHECKING, 
     
    565573        self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_MENU, 
    566574                                   self.on_right_click_theory) 
    567         self.sizer1.Add(tree_ctrl_label, 0, wx.LEFT, 10) 
    568         self.sizer1.Add(self.tree_ctrl, 1, wx.EXPAND | wx.ALL, 10) 
    569         self.sizer1.Add(tree_ctrl_theory_label, 0,  wx.LEFT, 10) 
    570         self.sizer1.Add(self.tree_ctrl_theory, 1, wx.EXPAND | wx.ALL, 10) 
     575        self.tree_ctrl.InsertItem(self.tree_ctrl.root, -1, " Data") 
     576        self.tree_ctrl_theory.InsertItem(self.tree_ctrl_theory.root, 
     577                                         -1, " Theory") 
     578        splitter.SplitHorizontally(self.tree_ctrl, self.tree_ctrl_theory) 
     579        self.sizer1.Add(splitter, 1, wx.EXPAND | wx.ALL, 10) 
    571580 
    572581    def on_right_click_theory(self, event): 
Note: See TracChangeset for help on using the changeset viewer.