Changeset 2528 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
Nov 16, 2016 4:10:58 PM (5 years ago)
Author:
vondreele
Message:

make all dataDisplay windows be right justified wrt last position. Adjusts position if too close to right edge.
Also implement right click on tree item to refresh data window & raise to top.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2521 r2528  
    25132513       
    25142514    def setSizePosLeft(self,Width):
    2515         clientSize = wx.ClientDisplayRect()
     2515        Width = list(Width)
     2516        Pos = self.GetPosition()
     2517        lastSize = self.G2frame.lastSize
     2518        clientSize = wx.ClientDisplayRect()     #display window size (e.g. 1304x768)
    25162519        Width[1] = min(Width[1],clientSize[2]-300)
    25172520        Width[0] = max(Width[0],300)
    25182521        self.SetSize(Width)
     2522        if lastSize[0]:
     2523            Pos[0] += lastSize[0]-Width[0]
     2524        offSet = Pos[0]+Width[0]-clientSize[2]
     2525        if offSet > 0:
     2526            Pos[0] -= offSet
    25192527#        self.SetPosition(wx.Point(clientSize[2]-Width[0],clientSize[1]+250))
     2528        self.SetPosition(wx.Point(Pos[0],Pos[1]))
     2529        self.G2frame.lastSize = Width
    25202530       
    25212531    def Clear(self):
Note: See TracChangeset for help on using the changeset viewer.