Changeset 1801
- Timestamp:
- Apr 21, 2015 2:01:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrls.py
r1770 r1801 1146 1146 if event.GetKeyCode() == wx.WXK_SHIFT: 1147 1147 self.trigger = True 1148 print 'debug: Shift pressed' 1148 1149 if self.timer.IsRunning(): 1149 1150 self.timer.Stop() … … 1165 1166 if iB < 0: 1166 1167 break 1167 self.trigger = not self.trigger1168 self.trigger = False 1168 1169 1169 1170 def Filter(self,event): … … 1365 1366 1366 1367 ################################################################################ 1367 #### Single choice Dialog with set all, toggle &filter options1368 #### Single choice Dialog with filter options 1368 1369 ################################################################################ 1369 1370 class G2SingleChoiceDialog(wx.Dialog): … … 1781 1782 print 'Error: help lookup failed!',event.GetEventObject() 1782 1783 print 'id=',event.GetId() 1783 #elif helpType == 'OldTutorials': # this will go away1784 #ShowHelp(helpType,self.frame)1785 1784 elif helpType == 'Tutorials': 1786 1785 dlg = OpenTutorial(self.frame) … … 2365 2364 sizer.Add(sizer1,0,wx.EXPAND|wx.ALL,0) 2366 2365 sizer.Add((10,10)) 2367 #======================================================================2368 # # This is needed only until we get all the tutorials items moved2369 # btn = wx.Button(pnl, wx.ID_ANY, "Open older tutorials")2370 # btn.Bind(wx.EVT_BUTTON, self.OpenOld)2371 # sizer.Add(btn,0,wx.ALIGN_CENTRE|wx.ALL)2372 #======================================================================2373 2366 self.BrowseMode = 1 2374 2367 choices = [ … … 2595 2588 frm = wx.Frame(None) # create a frame 2596 2589 frm.Show(True) 2597 dlg = OpenTutorial(frm)2598 if dlg.ShowModal() == wx.ID_OK:2599 print "OK"2600 else:2601 print "Cancel"2602 dlg.Destroy()2603 import sys2604 sys.exit()2590 #dlg = OpenTutorial(frm) 2591 #if dlg.ShowModal() == wx.ID_OK: 2592 # print "OK" 2593 #else: 2594 # print "Cancel" 2595 #dlg.Destroy() 2596 #import sys 2597 #sys.exit() 2605 2598 #====================================================================== 2606 2599 # test ScrolledMultiEditor … … 2655 2648 #print dictlst,"\n",elemlst 2656 2649 #print Checkdictlst,"\n",Checkelemlst 2657 dlg = ScrolledMultiEditor(2658 frm,dictlst,elemlst,prelbl,2659 checkdictlst=Checkdictlst,checkelemlst=Checkelemlst,2660 checklabel="Refine?",2661 header="test",CopyButton=True)2662 if dlg.ShowModal() == wx.ID_OK:2663 print "OK"2664 else:2665 print "Cancel"2650 # dlg = ScrolledMultiEditor( 2651 # frm,dictlst,elemlst,prelbl, 2652 # checkdictlst=Checkdictlst,checkelemlst=Checkelemlst, 2653 # checklabel="Refine?", 2654 # header="test",CopyButton=True) 2655 # if dlg.ShowModal() == wx.ID_OK: 2656 # print "OK" 2657 # else: 2658 # print "Cancel" 2666 2659 #print 'after',Data3,'\n',Data2 2667 2660 … … 2689 2682 # test G2MultiChoiceDialog 2690 2683 #====================================================================== 2691 #choices = []2692 #for i in range(21):2693 #choices.append("option_"+str(i))2694 #dlg = G2MultiChoiceDialog(frm, 'Sequential refinement',2695 #'Select dataset to include',2696 #choices)2697 #sel = range(2,11,2)2698 #dlg.SetSelections(sel)2699 #dlg.SetSelections((1,5))2700 #if dlg.ShowModal() == wx.ID_OK:2701 #for sel in dlg.GetSelections():2702 #print sel,choices[sel]2684 choices = [] 2685 for i in range(21): 2686 choices.append("option_"+str(i)) 2687 dlg = G2MultiChoiceDialog(frm, 'Sequential refinement', 2688 'Select dataset to include', 2689 choices) 2690 sel = range(2,11,2) 2691 dlg.SetSelections(sel) 2692 dlg.SetSelections((1,5)) 2693 if dlg.ShowModal() == wx.ID_OK: 2694 for sel in dlg.GetSelections(): 2695 print sel,choices[sel] 2703 2696 2704 2697 #====================================================================== … … 2715 2708 # print sel,choices[sel] 2716 2709 2717 pnl = wx.Panel(frm)2718 siz = wx.BoxSizer(wx.VERTICAL)2719 2720 td = {'Goni':200.,'a':1.,'calc':1./3.,'string':'s'}2721 for key in sorted(td):2722 txt = ValidatedTxtCtrl(pnl,td,key)2723 siz.Add(txt)2724 pnl.SetSizer(siz)2725 siz.Fit(frm)2726 app.MainLoop()2727 print td2710 # pnl = wx.Panel(frm) 2711 # siz = wx.BoxSizer(wx.VERTICAL) 2712 2713 # td = {'Goni':200.,'a':1.,'calc':1./3.,'string':'s'} 2714 # for key in sorted(td): 2715 # txt = ValidatedTxtCtrl(pnl,td,key) 2716 # siz.Add(txt) 2717 # pnl.SetSizer(siz) 2718 # siz.Fit(frm) 2719 # app.MainLoop() 2720 # print td
Note: See TracChangeset
for help on using the changeset viewer.