Ignore:
Timestamp:
Jul 2, 2017 9:33:22 AM (5 years ago)
Author:
vondreele
Message:

fixes to window resize issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASII.py

    r2890 r2893  
    25612561        self.Status = self.CreateStatusBar()
    25622562#TODO - split window tree on left, data on right
    2563         self.mainPanel = GSASIIsplit(self,-1)
     2563        self.mainPanel = GSASIIsplit(self,-1)       
    25642564        self.treePanel = wx.Panel(self.mainPanel, wx.ID_ANY,
    25652565            style = wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER)
    2566         self.treePanel.SetAutoLayout(True)
    25672566        self.dataPanel = wx.Panel(self.mainPanel, wx.ID_ANY,
    25682567            style = wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER)
    2569         self.dataWindow = G2gd.DataWindow(self.dataPanel)
    2570         self.dataWindow.SetAutoLayout(True)
    2571         self.dataWindow.SetInitialSize()
    25722568        self.mainPanel.SetMinimumPaneSize(100)
    25732569        self.mainPanel.SplitVertically(self.treePanel, self.dataPanel, 200)
    2574         self.dataFrame = self.dataWindow        #kluge!!
    25752570       
    25762571        wxID_PATTERNTREE = wx.NewId()
    25772572        treeSizer = wx.BoxSizer()
     2573        self.treePanel.SetSizer(treeSizer)
    25782574        self.PatternTree = G2G.G2TreeCtrl(id=wxID_PATTERNTREE,
    2579             parent=self.treePanel, size=self.treePanel.GetSize(),style=wx.TR_DEFAULT_STYLE )
    2580         treeSizer.Add(self.PatternTree,1,wx.EXPAND)
    2581         self.treePanel.SetSizer(treeSizer)
     2575            parent=self.treePanel, size=self.treePanel.GetClientSize(),style=wx.TR_DEFAULT_STYLE )
     2576        treeSizer.Add(self.PatternTree,1,wx.EXPAND|wx.ALL,0)
    25822577        self.PatternTree.Bind(wx.EVT_TREE_SEL_CHANGED,self.OnDataTreeSelChanged)
    25832578        self.PatternTree.Bind(wx.EVT_TREE_ITEM_RIGHT_CLICK,self.OnDataTreeSelChanged)
     
    25962591        self.root = self.PatternTree.root       
    25972592       
     2593        self.dataWindow = G2gd.DataWindow(self.dataPanel)
     2594        self.dataWindow.SetSize(self.dataPanel.GetClientSize())
     2595        self.dataWindow.SetAutoLayout(True)
     2596        self.dataWindow.SetInitialSize()
     2597        self.dataFrame = self.dataWindow        #kluge!!
     2598#        self.SetDataSize()
     2599       
     2600       
    25982601        plotFrame = wx.Frame(None,-1,'GSASII Plots',size=wx.Size(700,600), \
    25992602            style=wx.DEFAULT_FRAME_STYLE ^ wx.CLOSE_BOX)
    26002603        self.G2plotNB = G2plt.G2PlotNoteBook(plotFrame,G2frame=self)
    26012604        plotFrame.Show()
    2602         self.SetDataSize()
    26032605       
    26042606    def __init__(self, parent):
     
    27122714        w,h = self.GetClientSizeTuple()
    27132715        self.dataWindow.SetupScrolling()
    2714         self.mainPanel.SetSize(wx.Size(w,h+1))
    27152716        self.mainPanel.SetSize(wx.Size(w,h))
    27162717        self.PatternTree.SetSize(wx.Size(w,h))
    2717         self.dataWindow.SetSize(wx.Size(w,h))
    2718 #        self.dataWindow.Refresh()
    2719 #        self.dataWindow.Update()
     2718        self.dataWindow.SetSize(self.dataPanel.GetClientSize())
    27202719       
    27212720    def SetDataSize(self):
    27222721        Size = self.GetSize()
     2722        self.SetSize(Size)
    27232723        Size[1] += 1        #kluge to ensure scrollbar settings & window properly displayed
    2724         self.SetSize(Size)
    2725         Size[1] -= 1        #kluge to ensure scrollbar settings & window properly displayed
    27262724        self.SetSize(Size)
    27272725                               
Note: See TracChangeset for help on using the changeset viewer.