Changeset 2806
- Timestamp:
- Apr 24, 2017 10:49:46 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrls.py
r2802 r2806 2103 2103 :param str value: default input value, if any 2104 2104 ''' 2105 def __init__(self,parent,title,prompt,value='',size=(200,-1) ):2105 def __init__(self,parent,title,prompt,value='',size=(200,-1),help=''): 2106 2106 wx.Dialog.__init__(self,parent,wx.ID_ANY,title, 2107 2107 pos=wx.DefaultPosition, … … 2112 2112 self.panel = wx.Panel(self) 2113 2113 mainSizer = wx.BoxSizer(wx.VERTICAL) 2114 if help: 2115 sizer1 = wx.BoxSizer(wx.HORIZONTAL) 2116 sizer1.Add((-1,-1),1, wx.EXPAND, 0) 2117 sizer1.Add(HelpButton(self.panel,help),0,wx.ALIGN_RIGHT|wx.ALL) 2118 mainSizer.Add(sizer1,0,wx.ALIGN_RIGHT|wx.EXPAND) 2114 2119 mainSizer.Add(wx.StaticText(self.panel,-1,self.prompt),0,wx.ALIGN_CENTER) 2115 2120 self.valItem = wx.TextCtrl(self.panel,-1,value=self.value,size=size) -
trunk/GSASIIphsGUI.py
r2800 r2806 435 435 436 436 def OnSpaceGroup(event): 437 event.Skip() 438 Flds = SGTxt.GetValue().split() 437 helptext = '''\t\t\tGSAS-II space group information 438 439 Space groups are entered here as given in Volume A of the International Tables, 440 except that spaces are placed between operators (e.g. "P 4/m m m" or "P -3 1 m"). 441 442 Where a centrosymmetric space group has alternate origin settings, Origin 2 (with 443 the center of symmetry at the origin, which gives a -x,-y,-z symmetry operator) is 444 always used. 445 446 For rhombohedral space groups, (R xxx) the hexagonal setting is assumed. Append a 447 final R to the name (R xxx R) to indicate that a rhombohedral cell should be 448 used (not recommended when alpha >> 120, due to correlation.) 449 450 GSAS-II will accept non-standard settings of space groups. For example, space 451 group "P -1" can be set to include face centering, using symbol "F -1". 452 453 Review the symmetry operators generated by GSAS-II to confirm that you have 454 entered the right symbol for your structure. 455 ''' 456 dlg = G2G.SingleStringDialog(General, 457 'Get Space Group', 458 'Input the space group with spaces between operators (e.g. P 4/m m m)', 459 value=generalData['SGData']['SpGrp'],help=helptext) 460 if not dlg.Show(): 461 dlg.Destroy() 462 return 463 else: 464 Flds = dlg.GetValue().split() 465 dlg.Destroy() 439 466 #get rid of extra spaces between fields first 440 467 for fld in Flds: fld = fld.strip() … … 448 475 if SGErr: 449 476 text = [G2spc.SGErrors(SGErr)+'\nSpace Group set to previous'] 450 SGTxt.Set Value(generalData['SGData']['SpGrp'])477 SGTxt.SetLabel(generalData['SGData']['SpGrp']) 451 478 msg = 'Space Group Error' 452 479 Style = wx.ICON_EXCLAMATION … … 456 483 text,table = G2spc.SGPrint(SGData) 457 484 generalData['SGData'] = SGData 458 SGTxt.Set Value(generalData['SGData']['SpGrp'])485 SGTxt.SetLabel(generalData['SGData']['SpGrp']) 459 486 msg = 'Space Group Information' 460 487 G2gd.SGMessageBox(General,msg,text,table).Show() … … 529 556 nameSizer.Add(TypeTxt,0,WACV) 530 557 nameSizer.Add(wx.StaticText(General,-1,' Space group: '),0,WACV) 531 SGTxt = wx. TextCtrl(General,-1,value=generalData['SGData']['SpGrp'],style=wx.TE_PROCESS_ENTER)532 SGTxt.Bind(wx.EVT_ TEXT_ENTER,OnSpaceGroup)558 SGTxt = wx.Button(General,wx.ID_ANY,generalData['SGData']['SpGrp'],size=(100,-1)) 559 SGTxt.Bind(wx.EVT_BUTTON,OnSpaceGroup) 533 560 nameSizer.Add(SGTxt,0,WACV) 534 561 if generalData['Type'] in ['nuclear','magnetic']:
Note: See TracChangeset
for help on using the changeset viewer.