Changeset 2416
- Timestamp:
- Aug 10, 2016 10:35:06 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r2412 r2416 29 29 import scipy as sp 30 30 import wx 31 import wx.lib.scrolledpanel as wxscroll 31 32 try: # patch for LANG environment var problem on occasional OSX machines 32 33 import locale … … 2632 2633 'Allows user to supply scale factor(s) when summing data' 2633 2634 def __init__(self,parent,title,text,dataType,data): 2634 wx.Dialog.__init__(self,parent,-1,title, 2635 pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE )2635 wx.Dialog.__init__(self,parent,-1,title,size=(400,250), 2636 pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER) 2636 2637 self.data = data 2637 panel = wx.Panel(self) 2638 size = (400,250) 2639 panel = wxscroll.ScrolledPanel(self, wx.ID_ANY,size=size, 2640 style = wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER) 2638 2641 mainSizer = wx.BoxSizer(wx.VERTICAL) 2639 2642 topLabl = wx.StaticText(panel,-1,text) … … 2643 2646 dataGridSizer = wx.FlexGridSizer(cols=2,hgap=2,vgap=2) 2644 2647 for id,item in enumerate(self.data[:-1]): 2645 name = wx.TextCtrl(panel,-1,item[1],size=wx.Size( 200,20))2648 name = wx.TextCtrl(panel,-1,item[1],size=wx.Size(300,20)) 2646 2649 name.SetEditable(False) 2647 2650 scale = wx.TextCtrl(panel,id,'%.3f'%(item[0]),style=wx.TE_PROCESS_ENTER) … … 2653 2656 dataGridSizer.Add(wx.StaticText(panel,-1,'Sum result name: '+dataType),0, \ 2654 2657 wx.LEFT|wx.TOP|wx.ALIGN_CENTER_VERTICAL,10) 2655 self.name = wx.TextCtrl(panel,-1,self.data[-1],size=wx.Size( 200,20),style=wx.TE_PROCESS_ENTER)2658 self.name = wx.TextCtrl(panel,-1,self.data[-1],size=wx.Size(300,20),style=wx.TE_PROCESS_ENTER) 2656 2659 self.name.Bind(wx.EVT_TEXT_ENTER,self.OnNameChange) 2657 2660 self.name.Bind(wx.EVT_KILL_FOCUS,self.OnNameChange) … … 2669 2672 btnSizer.Add((20,20),1) 2670 2673 2674 panel.SetSizer(mainSizer) 2675 panel.SetAutoLayout(1) 2676 panel.SetupScrolling() 2671 2677 mainSizer.Add(btnSizer,0,wx.EXPAND|wx.BOTTOM|wx.TOP, 10) 2672 2678 panel.SetSizer(mainSizer) … … 2805 2811 2806 2812 def OnImageSum(self,event): 2807 'Sum together image data (?)'2813 'Sum together image data' 2808 2814 TextList = [] 2809 2815 DataList = [] … … 2875 2881 if Id: 2876 2882 pth = G2G.GetExportPath(self) 2877 dlg = wx.FileDialog(self, 'Choose sum image filename', pth, '',2883 dlg = wx.FileDialog(self, 'Choose sum image filename', pth,outname.split('IMG ')[1], 2878 2884 'G2img files (*.G2img)|*.G2img', 2879 2885 wx.SAVE|wx.FD_OVERWRITE_PROMPT) … … 2890 2896 if self.imageDefault: 2891 2897 Data = copy.copy(self.imageDefault) 2898 Data['formatName'] = 'GSAS-II image' 2892 2899 Data['showLines'] = True 2893 2900 Data['ring'] = [] -
trunk/GSASIIctrls.py
r2407 r2416 1151 1151 if sizevals[i]: kargs['size']=sizevals[i] 1152 1152 if CopyButton: 1153 import wx.lib.colourselect as wscs 1153 import wx.lib.colourselect as wscs # is there a way to test? 1154 1154 but = wscs.ColourSelect(label='v', # would like to use u'\u2193' or u'\u25BC' but not in WinXP 1155 # is there a way to test? 1156 parent=panel, 1157 colour=(255,255,200), 1158 size=wx.Size(30,23), 1159 style=wx.RAISED_BORDER) 1155 parent=panel,colour=(255,255,200),size=wx.Size(30,23), 1156 style=wx.RAISED_BORDER) 1160 1157 but.Bind(wx.EVT_BUTTON, self._OnCopyButton) 1161 1158 but.SetToolTipString('Press to copy adjacent value to all rows below')
Note: See TracChangeset
for help on using the changeset viewer.