Changeset 1378


Ignore:
Timestamp:
Jun 11, 2014 3:38:24 PM (7 years ago)
Author:
toby
Message:

wxPython 2.9 fixes: FlexGridSizer?, wx.Colour, MacOpenFile?; move bind to prevent Rigid body crash

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1368 r1378  
    21782178            mainSizer.Add((10,10),1)
    21792179            ncols = len(data)/40+1
    2180             dataGridSizer = wx.FlexGridSizer(rows=len(data),cols=ncols,hgap=2,vgap=2)
     2180            dataGridSizer = wx.FlexGridSizer(cols=ncols,hgap=2,vgap=2)
    21812181            for id,item in enumerate(self.data):
    21822182                ckbox = wx.CheckBox(panel,id,item[1])
     
    22292229            mainSizer.Add(topLabl,0,wx.ALIGN_CENTER_VERTICAL|wx.LEFT,10)
    22302230            mainSizer.Add((10,10),1)
    2231             dataGridSizer = wx.FlexGridSizer(rows=len(data),cols=2,hgap=2,vgap=2)
     2231            dataGridSizer = wx.FlexGridSizer(cols=2,hgap=2,vgap=2)
    22322232            for id,item in enumerate(self.data[:-1]):
    22332233                name = wx.TextCtrl(panel,-1,item[1],size=wx.Size(200,20))
     
    33623362        # end DEBUG
    33633363        return True
    3364     def MacOpenFile(self, filename):
    3365         '''Called on Mac every time a file is dropped on the app when it is running,
    3366         treat this like a File/Open project menu action.
    3367         Should be ignored on other platforms
    3368         '''
    3369         # PATCH: Canopy 1.4 script main seems dropped on app; ignore .py files
    3370         if os.path.splitext(filename)[1] == '.py': return
    3371         # end PATCH
    3372         self.main.OnFileOpen(None,filename)
    3373 
     3364    # def MacOpenFile(self, filename):
     3365    #     '''Called on Mac every time a file is dropped on the app when it is running,
     3366    #     treat this like a File/Open project menu action.
     3367    #     Should be ignored on other platforms
     3368    #     '''
     3369    #     # PATCH: Canopy 1.4 script main seems dropped on app; ignore .py files
     3370    #     print 'MacOpen',filename
     3371    #     if os.path.splitext(filename)[1] == '.py': return
     3372    #     # end PATCH
     3373    #     self.main.OnFileOpen(None,filename)
     3374    # removed because this gets triggered when a file is on the command line in canopy 1.4 -- not likely used anyway
     3375   
    33743376def main():
    33753377    '''Start up the GSAS-II application'''
  • trunk/GSASIIconstrGUI.py

    r1359 r1378  
    112112        mainSizer.Add(topLabl,0,wx.ALIGN_CENTER_VERTICAL|wx.LEFT,10)
    113113        mainSizer.Add((10,10),1)
    114         dataGridSizer = wx.FlexGridSizer(rows=len(data),cols=3,hgap=2,vgap=2)
     114        dataGridSizer = wx.FlexGridSizer(cols=3,hgap=2,vgap=2)
    115115        self.OkBtn = wx.Button(panel,wx.ID_OK)
    116116        for id in range(len(self.data)):
     
    735735        :returns: wx.Sizer created by method
    736736        '''
    737         constSizer = wx.FlexGridSizer(1,6,0,0)
     737        constSizer = wx.FlexGridSizer(0,6,0,0)
    738738        maxlen = 70 # characters before wrapping a constraint
    739739        for Id,item in enumerate(data[name]):
     
    10321032    resList = []
    10331033    plotDefaults = {'oldxy':[0.,0.],'Quaternion':[0.,0.,0.,1.],'cameraPos':30.,'viewDir':[0,0,1],}
    1034 
     1034   
    10351035    def OnPageChanged(event):
    10361036        global resList
     
    18281828    G2frame.dataFrame.Bind(wx.EVT_MENU, OnDefineTorsSeq, id=G2gd.wxID_RESIDUETORSSEQ)
    18291829    G2frame.dataDisplay = G2gd.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize())
    1830     G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
    18311830
    18321831    VectorRB = wx.ScrolledWindow(G2frame.dataDisplay)
     
    18351834    G2frame.dataDisplay.AddPage(ResidueRB,'Residue rigid bodies')
    18361835    UpdateVectorRB()
     1836    G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
    18371837   
  • trunk/GSASIIddataGUI.py

    r1257 r1378  
    626626        parms = zip(['S11','S22','S33','S12','S13','S23'],UseList[item]['Size'][4],
    627627            UseList[item]['Size'][5],range(6))
    628         dataSizer = wx.FlexGridSizer(1,6,5,5)
     628        dataSizer = wx.FlexGridSizer(0,6,5,5)
    629629        for Pa,val,ref,id in parms:
    630630            sizeRef = wx.CheckBox(DData,-1,label=Pa)
     
    648648            UseList[item]['Mustrain'][5] = numb*[False,]
    649649        parms = zip(Snames,UseList[item]['Mustrain'][4],UseList[item]['Mustrain'][5],range(numb))
    650         dataSizer = wx.FlexGridSizer(1,6,5,5)
     650        dataSizer = wx.FlexGridSizer(0,6,5,5)
    651651        for Pa,val,ref,id in parms:
    652652            strainRef = wx.CheckBox(DData,-1,label=Pa)
     
    664664
    665665    def HstrainSizer():
    666         hstrainSizer = wx.FlexGridSizer(1,6,5,5)
     666        hstrainSizer = wx.FlexGridSizer(0,6,5,5)
    667667        Hsnames = G2spc.HStrainNames(SGData)
    668668        parms = zip(Hsnames,UseList[item]['HStrain'][0],UseList[item]['HStrain'][1],range(len(Hsnames)))
     
    682682       
    683683    def PoTopSizer(POData):
    684         poSizer = wx.FlexGridSizer(1,6,5,5)
     684        poSizer = wx.FlexGridSizer(0,6,5,5)
    685685        choice = ['March-Dollase','Spherical harmonics']
    686686        POtype = choice[['MD','SH'].index(POData[0])]
     
    731731        mainSizer.Add(wx.StaticText(DData,-1,' Spherical harmonic coefficients: '+'Texture index: %.3f'%(textJ)),0,WACV)
    732732        mainSizer.Add((0,5),0)
    733         ODFSizer = wx.FlexGridSizer(2,8,2,2)
     733        ODFSizer = wx.FlexGridSizer(0,8,2,2)
    734734        ODFIndx = {}
    735735        ODFkeys = POData[5].keys()
  • trunk/GSASIIexprGUI.py

    r1373 r1378  
    392392                          'Assignment of variables to labels:'),
    393393            0,wx.EXPAND|wx.ALIGN_CENTER,0)
    394         GridSiz = wx.FlexGridSizer(len(self.exprVarLst)+1,5,2,2)
     394        GridSiz = wx.FlexGridSizer(0,5,2,2)
    395395        GridSiz.Add(
    396396            wx.StaticText(self.varbox,wx.ID_ANY,'label',style=wx.CENTER),
  • trunk/GSASIIgrid.py

    r1340 r1378  
    952952        cols = 3
    953953        if CopyButton: cols += 1
    954         subSizer = wx.FlexGridSizer(rows=len(dictlst),cols=cols,hgap=2,vgap=2)
     954        subSizer = wx.FlexGridSizer(cols=cols,hgap=2,vgap=2)
    955955        self.ValidatedControlsList = [] # make list of TextCtrls
    956956        for i,(d,k) in enumerate(zip(dictlst,elemlst)):
     
    11961196        mainSizer.Add((10,10),1)
    11971197       
    1198         radiiSizer = wx.FlexGridSizer(2,3,5,5)
     1198        radiiSizer = wx.FlexGridSizer(0,3,5,5)
    11991199        radiiSizer.Add(wx.StaticText(self.panel,-1,' Type'),0,WACV)
    12001200        radiiSizer.Add(wx.StaticText(self.panel,-1,'Bond radii'),0,WACV)
     
    12141214            radiiSizer.Add(aRadii,0,WACV)
    12151215        mainSizer.Add(radiiSizer,0,wx.EXPAND)
    1216         factorSizer = wx.FlexGridSizer(2,2,5,5)
     1216        factorSizer = wx.FlexGridSizer(0,2,5,5)
    12171217        Names = ['Bond','Angle']
    12181218        for i,name in enumerate(Names):
     
    18591859            num = len(fullVaryList) - len(varyList)
    18601860            mainSizer.Add(wx.StaticText(self,wx.ID_ANY,' + '+str(num)+' parameters are varied via constraints'))
    1861         subSizer = wx.FlexGridSizer(rows=len(parmDict)+1,cols=4,hgap=2,vgap=2)
     1861        subSizer = wx.FlexGridSizer(cols=4,hgap=2,vgap=2)
    18621862        parmNames = parmDict.keys()
    18631863        parmNames.sort()
  • trunk/GSASIIimgGUI.py

    r1376 r1378  
    391391            G2plt.PlotExposedImage(G2frame,event=event)
    392392           
    393         maxSizer = wx.FlexGridSizer(2,3,0,5)
     393        maxSizer = wx.FlexGridSizer(0,3,0,5)
    394394        maxSizer.AddGrowableCol(1,1)
    395395        maxSizer.SetFlexibleDirection(wx.HORIZONTAL)
     
    439439            penVal.SetValue("%6.3f" % (data['DetDepth']))          #reset in case of error                     
    440440           
    441         calibSizer = wx.FlexGridSizer(5,2,5,5)
     441        calibSizer = wx.FlexGridSizer(0,2,5,5)
    442442        calibSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Calibration coefficients'),0,WACV)   
    443443        calibSizer.Add((5,0),0)       
     
    614614            polaVal.SetValue('%.3f'%(data['PolaVal'][0]))
    615615                           
    616         dataSizer = wx.FlexGridSizer(5,2,5,3)
     616        dataSizer = wx.FlexGridSizer(0,2,5,3)
    617617        dataSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Integration coefficients'),0,WACV)   
    618618        dataSizer.Add((5,0),0)
     
    751751            darkMult.SetValue("%.3f" % (data['dark image'][1]))          #reset in case of error
    752752       
    753         backSizer = wx.FlexGridSizer(1,4,5,5)
     753        backSizer = wx.FlexGridSizer(0,4,5,5)
    754754
    755755        backSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Dark image'),0,WACV)
     
    825825            G2plt.PlotExposedImage(G2frame,event=event)
    826826   
    827         calibSizer = wx.FlexGridSizer(2,3,5,5)
     827        calibSizer = wx.FlexGridSizer(0,3,5,5)
    828828        comboSizer = wx.BoxSizer(wx.HORIZONTAL)   
    829829        comboSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Calibrant '),0,WACV)
     
    951951   
    952952    mainSizer.Add((5,5),0)
    953     DataSizer = wx.FlexGridSizer(1,2,5,5)
     953    DataSizer = wx.FlexGridSizer(0,2,5,5)
    954954    DataSizer.Add(CalibCoeffSizer(),0)
    955955    DataSizer.Add(IntegrateSizer(),0)       
     
    11981198    arcs = data['Arcs']                 #radius, start/end azimuth, thickness
    11991199   
    1200     littleSizer = wx.FlexGridSizer(2,3,0,5)
     1200    littleSizer = wx.FlexGridSizer(0,3,0,5)
    12011201    littleSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Lower/Upper limits '),0,WACV)
    12021202    Text = wx.TextCtrl(G2frame.dataDisplay,value=("%8d" % (thresh[0][0])),style=wx.TE_READONLY)
     
    12211221    delSpotId = []
    12221222    if spots:
    1223         littleSizer = wx.FlexGridSizer(len(spots)+2,3,0,5)
     1223        littleSizer = wx.FlexGridSizer(0,3,0,5)
    12241224        littleSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Spot masks:'),0,WACV)
    12251225        littleSizer.Add((5,0),0)
     
    12501250    delRingId = []
    12511251    if rings:
    1252         littleSizer = wx.FlexGridSizer(len(rings)+2,3,0,5)
     1252        littleSizer = wx.FlexGridSizer(0,3,0,5)
    12531253        littleSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Ring masks:'),0,WACV)
    12541254        littleSizer.Add((5,0),0)
     
    12791279    delArcId = []
    12801280    if arcs:
    1281         littleSizer = wx.FlexGridSizer(len(rings)+2,4,0,5)
     1281        littleSizer = wx.FlexGridSizer(0,4,0,5)
    12821282        littleSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Arc masks:'),0,WACV)
    12831283        littleSizer.Add((5,0),0)
     
    13161316    delFrameId = []
    13171317    if polygons:
    1318         littleSizer = wx.FlexGridSizer(len(polygons)+2,2,0,5)
     1318        littleSizer = wx.FlexGridSizer(0,2,0,5)
    13191319        littleSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Polygon masks:'),0,WACV)
    13201320        littleSizer.Add((5,0),0)
     
    13321332        mainSizer.Add(littleSizer,0,)
    13331333    if frame:
    1334         littleSizer = wx.FlexGridSizer(3,2,0,5)
     1334        littleSizer = wx.FlexGridSizer(0,2,0,5)
    13351335        littleSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Frame mask:'),0,
    13361336            WACV)
     
    15911591        Indx = {}
    15921592        delIndx = []   
    1593         dzeroSizer = wx.FlexGridSizer(1,8,5,5)
     1593        dzeroSizer = wx.FlexGridSizer(0,8,5,5)
    15941594        for id,dzero in enumerate(data['d-zero']):
    15951595            dzeroSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,label=(' d-zero #%d: '%(id))),0,WACV)
  • trunk/GSASIIphsGUI.py

    r1360 r1378  
    382382                if laue in cellGUI[0]:
    383383                    useGUI = cellGUI
    384             cellSizer = wx.FlexGridSizer(2,useGUI[1]+1,5,5)
     384            cellSizer = wx.FlexGridSizer(0,useGUI[1]+1,5,5)
    385385            if PWDR:
    386386                cellRef = wx.CheckBox(General,-1,label='Refine unit cell:')
     
    418418                    denSizer[2].SetValue('%.3f'%(mattCoeff))
    419419               
    420             elemSizer = wx.FlexGridSizer(8,len(generalData['AtomTypes'])+1,1,1)
     420            elemSizer = wx.FlexGridSizer(0,len(generalData['AtomTypes'])+1,1,1)
    421421            elemSizer.Add(wx.StaticText(General,label=' Elements'),0,WACV)
    422422            for elem in generalData['AtomTypes']:
     
    16991699            dlg, wx.ID_ANY,#size=(100,200),
    17001700            style = wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER)
    1701         subSizer1 = wx.FlexGridSizer(rows=1,cols=2,hgap=5,vgap=2)
     1701        subSizer1 = wx.FlexGridSizer(cols=2,hgap=5,vgap=2)
    17021702        panel2 = wxscroll.ScrolledPanel(
    17031703            dlg, wx.ID_ANY,#size=(100,200),
    17041704            style = wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER)
    1705         subSizer2 = wx.FlexGridSizer(rows=1,cols=3,hgap=5,vgap=2)
     1705        subSizer2 = wx.FlexGridSizer(cols=3,hgap=5,vgap=2)
    17061706        subSizer1.Add(wx.StaticText(panel1,wx.ID_ANY,'Parameter name  '))
    17071707        subSizer1.Add(wx.StaticText(panel1,wx.ID_ANY,' value'),0,wx.ALIGN_RIGHT)
     
    27842784           
    27852785            slopSizer = wx.BoxSizer(wx.HORIZONTAL)
    2786             slideSizer = wx.FlexGridSizer(7,2)
     2786            slideSizer = wx.FlexGridSizer(0,2)
    27872787            slideSizer.AddGrowableCol(1,1)
    27882788   
     
    31663166        mainSizer.Add(titleSizer,0)
    31673167        mainSizer.Add((0,5),0)
    3168         shSizer = wx.FlexGridSizer(1,6,5,5)
     3168        shSizer = wx.FlexGridSizer(0,6,5,5)
    31693169        shSizer.Add(wx.StaticText(Texture,-1,'Texture model: '),0,WACV)
    31703170        shModel = wx.ComboBox(Texture,-1,value=textureData['Model'],choices=shModels,
     
    31873187        mainSizer.Add(shSizer,0,0)
    31883188        mainSizer.Add((0,5),0)
    3189         PTSizer = wx.FlexGridSizer(2,4,5,5)
     3189        PTSizer = wx.FlexGridSizer(0,4,5,5)
    31903190        PTSizer.Add(wx.StaticText(Texture,-1,' Texture plot type: '),0,WACV)
    31913191        choices = ['Axial pole distribution','Pole figure','Inverse pole figure']           
     
    32243224            mainSizer.Add(wx.StaticText(Texture,-1,'Spherical harmonic coefficients: '),0,WACV)
    32253225            mainSizer.Add((0,5),0)
    3226             ODFSizer = wx.FlexGridSizer(2,8,2,2)
     3226            ODFSizer = wx.FlexGridSizer(0,8,2,2)
    32273227            ODFIndx = {}
    32283228            ODFkeys = textureData['SH Coeff'][1].keys()
     
    34463446                RBObj['ThermalMotion'][2][item] = Obj.GetValue()
    34473447           
    3448             thermSizer = wx.FlexGridSizer(1,9,5,5)
     3448            thermSizer = wx.FlexGridSizer(0,9,5,5)
    34493449            model = RBObj['ThermalMotion']
    34503450            if model[0] == 'Uiso':
     
    35213521                    pass
    35223522               
    3523             topSizer = wx.FlexGridSizer(2,6,5,5)
     3523            topSizer = wx.FlexGridSizer(0,6,5,5)
    35243524            Orig = RBObj['Orig'][0]
    35253525            Orien,OrienV = G2mth.Q2AVdeg(RBObj['Orient'][0])
     
    36013601            resrbSizer.Add(LocationSizer(RBObj,'Residue'))
    36023602            resrbSizer.Add(wx.StaticText(RigidBodies,-1,'Torsions:'),0,WACV)
    3603             torSizer = wx.FlexGridSizer(1,6,5,5)
     3603            torSizer = wx.FlexGridSizer(0,6,5,5)
    36043604            for itors,tors in enumerate(RBObj['Torsions']):
    36053605                torSizer.Add(wx.StaticText(RigidBodies,-1,'Torsion '+'%d'%(itors)),0,WACV)
     
    39453945                    0,WACV)
    39463946                mainSizer.Add((5,5),0)
    3947                 OriSizer = wx.FlexGridSizer(1,5,5,5)
     3947                OriSizer = wx.FlexGridSizer(0,5,5,5)
    39483948                OriSizer.Add(wx.StaticText(RigidBodies,-1,'Origin x,y,z: '),0,WACV)
    39493949                for ix,x in enumerate(Orig):
     
    39643964                mainSizer.Add(OriSizer)
    39653965                mainSizer.Add((5,5),0)
    3966                 RefSizer = wx.FlexGridSizer(1,7,5,5)
     3966                RefSizer = wx.FlexGridSizer(0,7,5,5)
    39673967                if len(atomData):
    39683968                    RefSizer.Add(wx.StaticText(RigidBodies,-1,'Location setting: Select match to'),0,WACV)
     
    39853985                    rbAtTypes = data['testRBObj']['rbAtTypes']
    39863986                    rbSeq = RBData['Residue'][rbId]['rbSeq']
    3987                     TorSizer = wx.FlexGridSizer(1,4)
     3987                    TorSizer = wx.FlexGridSizer(0,4)
    39883988                    TorSizer.AddGrowableCol(1,1)
    39893989                    for t,[torsion,seq] in enumerate(zip(Torsions,rbSeq)):
     
    42574257        def atomSizer(model):
    42584258           
    4259             atomsizer = wx.FlexGridSizer(1,7,5,5)
     4259            atomsizer = wx.FlexGridSizer(0,7,5,5)
    42604260            atomsizer.Add(wx.StaticText(MCSA,-1,' Atom: '+model['name']+': '),0,WACV)
    42614261            for ix,item in enumerate(['x','y','z']):
     
    43294329           
    43304330            rbsizer = wx.BoxSizer(wx.VERTICAL)
    4331             rbsizer1 = wx.FlexGridSizer(1,7,5,5)
     4331            rbsizer1 = wx.FlexGridSizer(0,7,5,5)
    43324332            rbsizer1.Add(wx.StaticText(MCSA,-1,model['Type']+': '+model['name']+': '),0,WACV)
    43334333            for ix,item in enumerate(['x','y','z']):
     
    43564356                rbsizer1.Add(posRange,0,WACV)
    43574357               
    4358             rbsizer2 = wx.FlexGridSizer(1,6,5,5)
     4358            rbsizer2 = wx.FlexGridSizer(0,6,5,5)
    43594359            Ori = model['Ori'][0]
    43604360            rbsizer2.Add(wx.StaticText(MCSA,-1,'Oa: '),0,WACV)
     
    43974397                atNames = RBData['Residue'][model['RBId']]['atNames']
    43984398                rbsizer.Add(wx.StaticText(MCSA,-1,'Torsions:'),0,WACV)
    4399                 rbsizer3 = wx.FlexGridSizer(1,8,5,5)
     4399                rbsizer3 = wx.FlexGridSizer(0,8,5,5)
    44004400                for it,tor in enumerate(model['Tor'][0]):
    44014401                    iBeg,iFin = RBData['Residue'][model['RBId']]['rbSeq'][it][:2]
  • trunk/GSASIIplot.py

    r1377 r1378  
    32683268    Rd = np.array([255,0,0])
    32693269    Gr = np.array([0,255,0])
    3270     wxGreen = wx.Color(0,255,0)
     3270    wxGreen = wx.Colour(0,255,0)
    32713271    Bl = np.array([0,0,255])
    32723272    Or = np.array([255,128,0])
    3273     wxOrange = wx.Color(255,128,0)
     3273    wxOrange = wx.Colour(255,128,0)
    32743274    uBox = np.array([[0,0,0],[1,0,0],[1,1,0],[0,1,0],[0,0,1],[1,0,1],[1,1,1],[0,1,1]])
    32753275    uEdges = np.array([
     
    38873887    def RenderLabel(x,y,z,label,r,color,matRot):
    38883888        '''
    3889         color wx.Color object
     3889        color wx.Colour object
    38903890        '''       
    38913891        glPushMatrix()
  • trunk/GSASIIpwdGUI.py

    r1367 r1378  
    676676        backSizer.Add(topSizer)
    677677        backSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Background coefficients:'),0,WACV)
    678         bakSizer = wx.FlexGridSizer(1,5,5,5)
     678        bakSizer = wx.FlexGridSizer(0,5,5,5)
    679679        for i,value in enumerate(data[0][3:]):
    680680            bakVal = wx.TextCtrl(G2frame.dataDisplay,wx.ID_ANY,'%10.4f'%(value),style=wx.TE_PROCESS_ENTER)
     
    11671167    G2frame.dataFrame.SetLabel('Instrument Parameters')
    11681168    G2frame.dataDisplay = wx.Panel(G2frame.dataFrame)
    1169     topSizer = wx.FlexGridSizer(1,6,5,5)
    1170     instSizer = wx.FlexGridSizer(2,6,5,5)
     1169    topSizer = wx.FlexGridSizer(0,6,5,5)
     1170    instSizer = wx.FlexGridSizer(0,6,5,5)
    11711171    topSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Histogram Type: '+insVal['Type']),0,WACV)
    11721172#    topSizer.Add((5,5),0)
     
    16411641        mainSizer.Add((5,5),0)
    16421642
    1643     parmSizer = wx.FlexGridSizer(10,2,5,0)
     1643    parmSizer = wx.FlexGridSizer(0,2,5,0)
    16441644    for key,lbl,nDig in parms:
    16451645        if 'list' in str(type(data[key])):
     
    16691669        anomrho = [0.,0.]
    16701670        mu = 0.
    1671         subSizer = wx.FlexGridSizer(1,4,5,5)
     1671        subSizer = wx.FlexGridSizer(0,4,5,5)
    16721672        Substances = G2frame.PatternTree.GetItemPyData(
    16731673            G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId, 'Substances'))
     
    21702170    mainSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Indexing controls: '),0,WACV)
    21712171    mainSizer.Add((5,5),0)
    2172     littleSizer = wx.FlexGridSizer(2,5,5,5)
     2172    littleSizer = wx.FlexGridSizer(0,5,5,5)
    21732173    littleSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Max Nc/Nobs '),0,WACV)
    21742174    NcNo = wx.SpinCtrl(G2frame.dataDisplay)
     
    21872187        0,WACV)
    21882188    mainSizer.Add((5,5),0)
    2189     littleSizer = wx.FlexGridSizer(2,7,5,5)
     2189    littleSizer = wx.FlexGridSizer(0,7,5,5)
    21902190    bravList = []
    21912191    bravs = zip(bravais,bravaisNames)
     
    22322232            useGUI = cellGUI
    22332233    cellList = []
    2234     littleSizer = wx.FlexGridSizer(2,useGUI[1],5,5)
     2234    littleSizer = wx.FlexGridSizer(0,useGUI[1],5,5)
    22352235    for txt,fmt,ifEdit,Id in useGUI[2]:
    22362236        littleSizer.Add(wx.StaticText(G2frame.dataDisplay,label=txt),0,WACV)
     
    25942594                    0,WACV)
    25952595            else:   
    2596                 elSizer = wx.FlexGridSizer(1,6,5,5)
     2596                elSizer = wx.FlexGridSizer(0,6,5,5)
    25972597                Substance = data['Substances'][name]
    25982598                Elems = Substance['Elements']
     
    26062606                    elSizer.Add(num,0,WACV)
    26072607                substSizer.Add(elSizer,0)
    2608                 vdsSizer = wx.FlexGridSizer(1,4,5,5)
     2608                vdsSizer = wx.FlexGridSizer(0,4,5,5)
    26092609                vdsSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Volume: '),
    26102610                    0,WACV)
     
    29402940        sizeSizer = wx.BoxSizer(wx.VERTICAL)
    29412941        sizeSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Size distribution parameters: '),0,WACV)
    2942         binSizer = wx.FlexGridSizer(1,7,5,5)
     2942        binSizer = wx.FlexGridSizer(0,7,5,5)
    29432943        binSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' No. size bins: '),0,WACV)
    29442944        bins = ['50','100','150','200']
     
    31553155           
    31563156        def ParmSizer():
    3157             parmSizer = wx.FlexGridSizer(1,3,5,5)
     3157            parmSizer = wx.FlexGridSizer(0,3,5,5)
    31583158            parmSizer.AddGrowableCol(2,1)
    31593159            parmSizer.SetFlexibleDirection(wx.HORIZONTAL)
     
    37903790#    mainSizer.Add(dataSizer,0)
    37913791    mainSizer.Add((5,5),0)
    3792     fileSizer = wx.FlexGridSizer(3,6,5,1)
     3792    fileSizer = wx.FlexGridSizer(0,6,5,1)
    37933793    select = ['Sample Bkg.','Container']
    37943794    if data['Container']['Name']:
     
    38043804    Abs = G2lat.CellAbsorption(ElList,data['Form Vol'])
    38053805    Trans = G2pwd.Transmission(data['Geometry'],Abs*data['Pack'],data['Diam'])
    3806     elemSizer = wx.FlexGridSizer(3,3,5,1)
     3806    elemSizer = wx.FlexGridSizer(0,3,5,1)
    38073807    for El in ElList:
    38083808        FillElemSizer(elemSizer,ElList[El])
  • trunk/scanCCD.py

    r1112 r1378  
    308308                           
    309309            colorList = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")]
    310             colorSizer = wx.FlexGridSizer(1,5,5,5)
     310            colorSizer = wx.FlexGridSizer(0,5,5,5)
    311311            colorSizer.Add(wx.StaticText(self.SCCDPanel,label=' Color bar '),0,wx.ALIGN_CENTER_VERTICAL)
    312312            colSel = wx.ComboBox(self.SCCDPanel,value=data['color'],choices=colorList,
     
    345345                self.PlotImage()
    346346           
    347             maxSizer = wx.FlexGridSizer(1,3,0,5)
     347            maxSizer = wx.FlexGridSizer(0,3,0,5)
    348348            maxSizer.AddGrowableCol(1,1)
    349349            maxSizer.SetFlexibleDirection(wx.HORIZONTAL)
     
    371371                self.PlotImage()
    372372           
    373             zSizer = wx.FlexGridSizer(1,4,5,5)
     373            zSizer = wx.FlexGridSizer(0,4,5,5)
    374374            zSizer.Add(wx.StaticText(self.SCCDPanel,label='Upper intensity mask:'),0,wx.ALIGN_CENTER_VERTICAL)
    375375            zMax = wx.TextCtrl(self.SCCDPanel,value='%d'%(data['Zmax']))
     
    411411                self.PlotImage()
    412412           
    413             zeroSizer = wx.FlexGridSizer(1,6,5,5)
     413            zeroSizer = wx.FlexGridSizer(0,6,5,5)
    414414            zeroSizer.Add(wx.StaticText(self.SCCDPanel,label='X-zero:'),0,wx.ALIGN_CENTER_VERTICAL)
    415415            zMax = wx.TextCtrl(self.SCCDPanel,value='%.3f'%(data['Zeros'][0]))
     
    445445                self.PlotImage()
    446446           
    447             TBLRsizer = wx.FlexGridSizer(2,4,5,5)
     447            TBLRsizer = wx.FlexGridSizer(0,4,5,5)
    448448            for i,item in enumerate(['Bottom','Top']):
    449449                TBLRsizer.Add(wx.StaticText(self.SCCDPanel,label=item+' limit, pixels:'),0,wx.ALIGN_CENTER_VERTICAL)
     
    474474                self.PlotImage()
    475475           
    476             scanSizer = wx.FlexGridSizer(1,6,5,5)
     476            scanSizer = wx.FlexGridSizer(0,6,5,5)
    477477            for i,item in enumerate(['Lower 2-th','Upper 2-th','2-th step']):
    478478                scanSizer.Add(wx.StaticText(self.SCCDPanel,label=item+':'),0,wx.ALIGN_CENTER_VERTICAL)
  • trunk/testDeriv.py

    r1299 r1378  
    127127        use = self.use
    128128        delt = self.delt
    129         mainSizer = wx.FlexGridSizer(1,8,5,5)
     129        mainSizer = wx.FlexGridSizer(0,8,5,5)
    130130        for id,[ck,name,d] in enumerate(zip(use,varylist,delt)):
    131131            useVal = wx.CheckBox(self.testDerivPanel,label=name)
Note: See TracChangeset for help on using the changeset viewer.