Changeset 2172 for trunk/GSASIIgrid.py
- Timestamp:
- Mar 15, 2016 3:07:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIgrid.py
r2166 r2172 489 489 parent = self.GetParent() 490 490 parent.Raise() 491 self.EndModal(wx.ID_CANCEL) 491 self.EndModal(wx.ID_CANCEL) 492 493 ################################################################################ 494 class DIFFaXcontrols(wx.Dialog): 495 ''' Solicit items needed to prepare DIFFaX control.dif file 496 ''' 497 def __init__(self,parent,ctrls): 498 wx.Dialog.__init__(self,parent,wx.ID_ANY,'DIFFaX controls', 499 pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE) 500 self.panel = wx.Panel(self) #just a dummy - gets destroyed in Draw! 501 self.ctrls = ctrls 502 self.Draw() 503 504 def Draw(self): 505 506 507 508 self.panel.Destroy() 509 self.panel = wx.Panel(self) 510 mainSizer = wx.BoxSizer(wx.VERTICAL) 511 mainSizer.Add(wx.StaticText(self.panel,label=' Controls for DIFFaX'),0,WACV) 512 513 514 OkBtn = wx.Button(self.panel,-1,"Ok") 515 OkBtn.Bind(wx.EVT_BUTTON, self.OnOk) 516 cancelBtn = wx.Button(self.panel,-1,"Cancel") 517 cancelBtn.Bind(wx.EVT_BUTTON, self.OnCancel) 518 btnSizer = wx.BoxSizer(wx.HORIZONTAL) 519 btnSizer.Add((20,20),1) 520 btnSizer.Add(OkBtn) 521 btnSizer.Add((20,20),1) 522 btnSizer.Add(cancelBtn) 523 btnSizer.Add((20,20),1) 524 525 mainSizer.Add(btnSizer,0,wx.EXPAND|wx.BOTTOM|wx.TOP, 10) 526 self.panel.SetSizer(mainSizer) 527 self.panel.Fit() 528 self.Fit() 529 530 def GetSelection(self): 531 return self.ctrls 532 533 def OnOk(self,event): 534 parent = self.GetParent() 535 parent.Raise() 536 self.EndModal(wx.ID_OK) 537 538 def OnCancel(self,event): 539 parent = self.GetParent() 540 parent.Raise() 541 self.EndModal(wx.ID_CANCEL) 542 492 543 493 544 ################################################################################
Note: See TracChangeset
for help on using the changeset viewer.