Changeset 2640
- Timestamp:
- Jan 17, 2017 5:11:27 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIgrid.py
r2635 r2640 2542 2542 self.userReSize = True 2543 2543 2544 def setSizePosLeft(self, Width):2544 def setSizePosLeft(self,Size): 2545 2545 '''Place the dataFrame window so that the upper left-hand corner remains in the same place; 2546 2546 The size is dictated by parameter Width, unless overridden by a previous Phase window resize 2547 2547 ''' 2548 2548 self.userReSize = False 2549 Width = list(Width)2549 Size = list(Size) 2550 2550 id = self.G2frame.PatternTree.GetSelection() 2551 2551 try: #avoid bad tree item on start via gpx file selection … … 2557 2557 # is this a phase window and has a previous window has been resized? 2558 2558 if self.manualPhaseSize and parent == "Phases": 2559 Width= list(self.manualPhaseSize)2559 Size = list(self.manualPhaseSize) 2560 2560 Pos = self.GetPosition() 2561 2561 clientSize = wx.ClientDisplayRect() #display window size (e.g. 1304x768) 2562 Width[1] = min(Width[1],clientSize[2]-300)2563 Width[0] = max(Width[0],300)2562 Size[1] = min(Size[1],clientSize[2]-300) 2563 Size[0] = max(Size[0],300) 2564 2564 # print 'current position/width:',Pos,Width 2565 self.SetSize( Width)2565 self.SetSize(Size) 2566 2566 if self.lastSize[0]: 2567 Pos[0] += self.lastSize[0]- Width[0]2567 Pos[0] += self.lastSize[0]-Size[0] 2568 2568 offSet = 0 2569 2569 if Pos[0] < clientSize[2]: 2570 offSet = Pos[0]+ Width[0]-clientSize[2]2570 offSet = Pos[0]+Size[0]-clientSize[2] 2571 2571 if offSet > 0: 2572 2572 Pos[0] -= offSet 2573 2573 self.SetPosition(wx.Point(Pos[0],Pos[1])) 2574 self.lastSize = Width2574 self.lastSize = Size 2575 2575 self.userReSize = True 2576 2576 -
trunk/GSASIIphsGUI.py
r2638 r2640 75 75 phasePage.Scroll(0,Scroll) 76 76 Size[1] = min(500,Size[1]) 77 mainFrame.setSizePosLeft(Size) 78 Size[1] += 1 #kluge to get correct scrolling! 77 79 mainFrame.setSizePosLeft(Size) 78 80 … … 3056 3058 attr.SetEditor(G2G.GridFractionEditor(atomGrid)) 3057 3059 atomGrid.SetColAttr(c, attr) 3060 for row,atom in enumerate(Layer['Atoms']): 3061 atomGrid.SetReadOnly(row,1,True) 3058 3062 atomGrid.Bind(wg.EVT_GRID_CELL_LEFT_DCLICK, AtomTypeSelect) 3059 3063 atomGrid.AutoSizeColumns(True)
Note: See TracChangeset
for help on using the changeset viewer.