Changeset 2950


Ignore:
Timestamp:
Jul 30, 2017 3:01:17 PM (4 years ago)
Author:
vondreele
Message:

oops - forgot the SetSizer? in SetPhaseWindow?
make SetScrollRate?(0,0) the default for GSGrid - grids have no scroll bars
remove all those individual SetScrollRates? everywhere a GSGrid is made - all did same thing.

Location:
branch/2frame
Files:
4 edited

Legend:

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

    r2940 r2950  
    17681768                for col in [4,5,6]:
    17691769                    vecGrid.SetCellStyle(row,col,VERY_LIGHT_GREY,True)
    1770             vecGrid.SetScrollRate(0,0)
     1770#            vecGrid.SetScrollRate(0,0)
    17711771            vecGrid.AutoSizeColumns(False)
    17721772            vecSizer.Add(vecGrid)
     
    19301930                for col in range(5):
    19311931                    vecGrid.SetCellStyle(row,col,VERY_LIGHT_GREY,True)
    1932             vecGrid.SetScrollRate(0,0)
     1932#            vecGrid.SetScrollRate(0,0)
    19331933            vecGrid.AutoSizeColumns(False)
    19341934            vecSizer = wx.BoxSizer()
  • branch/2frame/GSASIIctrlGUI.py

    r2939 r2950  
    31093109        if hasattr(parent.TopLevelParent,'currentGrids'):
    31103110            parent.TopLevelParent.currentGrids.append(self)      # save a reference to the grid in the Frame
     3111        self.SetScrollRate(0,0)         #GSAS-II grids have no scroll bars by default
    31113112           
    31123113    def Clear(self):
  • branch/2frame/GSASIIphsGUI.py

    r2949 r2950  
    985985   
    986986def SetPhaseWindow(phasePage,mainSizer=None,size=None,Scroll=0):
     987    if not mainSizer is None:
     988        phasePage.SetSizer(mainSizer)
    987989    phasePage.SetAutoLayout(True)
    988990    phasePage.SetScrollRate(1,1)
    989991    phasePage.SendSizeEvent()
    990992
    991 #    if not mainSizer is None:
    992 #        phasePage.SetSizer(mainSizer)
    993993#        Size = mainSizer.GetMinSize()
    994994#    else:
     
    38753875            atomGrid = G2G.GSGrid(layerData)
    38763876            atomGrid.SetTable(atomTable,True)
    3877             atomGrid.SetScrollRate(0,0)    #get rid of automatic scroll bars
     3877#            atomGrid.SetScrollRate(0,0)    #get rid of automatic scroll bars
    38783878            for c in range(2,5):
    38793879                attr = wx.grid.GridCellAttr()
     
    39613961                transGrid = G2G.GSGrid(layerData)
    39623962                transGrid.SetTable(transTable,True)
    3963                 transGrid.SetScrollRate(0,0)    #get rid of automatic scroll bars
     3963#                transGrid.SetScrollRate(0,0)    #get rid of automatic scroll bars
    39643964                Indx[transGrid.GetId()] = Yi
    39653965                for c in range(0,4):
     
    76467646                    else:
    76477647                        resultsGrid.SetCellStyle(r,c,VERY_LIGHT_GREY,True)
    7648             resultsGrid.SetScrollRate(0,0)
     7648#            resultsGrid.SetScrollRate(0,0)
    76497649            resultsSizer.Add(resultsGrid,0,wx.EXPAND)
    76507650            return resultsSizer
     
    88398839    Pages.append('Data')
    88408840    Atoms = G2G.GSGrid(G2frame.phaseDisplay)
    8841     Atoms.SetScrollRate(0,0)
     8841#    Atoms.SetScrollRate(0,0)
    88428842    G2frame.phaseDisplay.gridList.append(Atoms)
    88438843    G2frame.phaseDisplay.AddPage(Atoms,'Atoms')
     
    88558855    Pages.append('Draw Options')
    88568856    drawAtoms = G2G.GSGrid(G2frame.phaseDisplay)
    8857     drawAtoms.SetScrollRate(0,0)
     8857#    drawAtoms.SetScrollRate(0,0)
    88588858    G2frame.phaseDisplay.gridList.append(drawAtoms)
    88598859    G2frame.phaseDisplay.AddPage(drawAtoms,'Draw Atoms')
     
    88648864        Pages.append('RB Models')
    88658865    MapPeaks = G2G.GSGrid(G2frame.phaseDisplay)
    8866     MapPeaks.SetScrollRate(0,0)
     8866#    MapPeaks.SetScrollRate(0,0)
    88678867    G2frame.phaseDisplay.gridList.append(MapPeaks)   
    88688868    G2frame.phaseDisplay.AddPage(MapPeaks,'Map peaks')
     
    88768876    Pages.append('Texture')
    88778877    G2frame.PawleyRefl = G2G.GSGrid(G2frame.phaseDisplay)
    8878     G2frame.PawleyRefl.SetScrollRate(0,0)
     8878#    G2frame.PawleyRefl.SetScrollRate(0,0)
    88798879    G2frame.phaseDisplay.gridList.append(G2frame.PawleyRefl)
    88808880    G2frame.phaseDisplay.AddPage(G2frame.PawleyRefl,'Pawley reflections')
  • branch/2frame/GSASIIpwdGUI.py

    r2938 r2950  
    881881#    G2frame.dataWindow.Bind(wg.EVT_GRID_CELL_LEFT_DCLICK, onCellListDClick)
    882882    reflGrid.AutoSizeColumns(False)
    883     reflGrid.SetScrollRate(0,0)
     883#    reflGrid.SetScrollRate(0,0)
    884884    G2frame.reflGrid = reflGrid
    885885    mainSizer.Add(reflGrid)         #,1,wx.ALL|wx.EXPAND,1)
     
    11771177            debyeTable = G2G.Table(data[1]['debyeTerms'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    11781178            debyeGrid = G2G.GSGrid(parent=G2frame.dataWindow)
    1179             debyeGrid.SetScrollRate(0,0)
     1179#            debyeGrid.SetScrollRate(0,0)
    11801180            debyeGrid.SetTable(debyeTable, True)
    11811181            debyeGrid.Bind(wx.EVT_KEY_DOWN, KeyEditPeakGrid)
     
    12391239            peaksTable = G2G.Table(data[1]['peaksList'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    12401240            peaksGrid = G2G.GSGrid(parent=G2frame.dataWindow)
    1241             peaksGrid.SetScrollRate(0,0)
     1241#            peaksGrid.SetScrollRate(0,0)
    12421242            peaksGrid.SetTable(peaksTable, True)
    12431243            peaksGrid.Bind(wx.EVT_KEY_DOWN, KeyEditPeakGrid)
     
    26452645    G2frame.indxPeaks.Bind(wg.EVT_GRID_CELL_LEFT_CLICK, RefreshIndexPeaksGrid)
    26462646    G2frame.indxPeaks.Bind(wx.EVT_KEY_DOWN, KeyEditPickGrid)                 
    2647     G2frame.indxPeaks.SetScrollRate(0,0)
     2647#    G2frame.indxPeaks.SetScrollRate(0,0)
    26482648    G2frame.indxPeaks.AutoSizeColumns(False)
    26492649    if len(XY):
     
    33293329        gridDisplay.Bind(wg.EVT_GRID_CELL_LEFT_CLICK,RefreshUnitCellsGrid)
    33303330        gridDisplay.Bind(wg.EVT_GRID_LABEL_LEFT_DCLICK,OnSortCells)
    3331         gridDisplay.SetScrollRate(0,0)
     3331#        gridDisplay.SetScrollRate(0,0)
    33323332        gridDisplay.SetRowLabelSize(0)
    33333333        gridDisplay.AutoSizeColumns(False)
Note: See TracChangeset for help on using the changeset viewer.