Changeset 4868 for trunk/exports/G2export_CIF.py
- Timestamp:
- Mar 30, 2021 5:45:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/exports/G2export_CIF.py
r4856 r4868 2678 2678 self.msg=msg 2679 2679 self.parent = parent 2680 #self.helpwin = self.parent.helpwin2681 2680 self.helpwin = helpwin 2682 2681 self.helptxt = helptxt … … 2684 2683 'Respond to a button press by displaying the requested text' 2685 2684 try: 2686 #helptxt = self.helptxt2685 ww,wh = self.helpwin.GetSize() 2687 2686 ow,oh = self.helptxt.GetSize() 2688 2687 self.helptxt.SetLabel(self.msg) 2688 self.helptxt.Wrap(ww-10) 2689 2689 w,h = self.helptxt.GetSize() 2690 if h > oh: 2690 if h > oh: # resize the help area if needed, but avoid changing width 2691 self.helptxt.SetMinSize((ww,h)) 2691 2692 self.helpwin.GetSizer().Fit(self.helpwin) 2692 2693 except: # error posting help, ignore … … 2801 2802 savebtn.Bind(wx.EVT_BUTTON,self._onSave) 2802 2803 OKbtn = wx.Button(self, wx.ID_OK, "Use") 2804 OKbtn.Bind(wx.EVT_BUTTON, lambda x: self.EndModal(wx.ID_OK)) 2803 2805 OKbtn.SetDefault() 2804 2806 OKbuttons.append(OKbtn) … … 2833 2835 defaultFile=self.defaultname, 2834 2836 wildcard="CIF (*.cif)|*.cif", 2835 style=wx. SAVE)2837 style=wx.FD_SAVE) 2836 2838 val = (dlg.ShowModal() == wx.ID_OK) 2837 2839 fil = dlg.GetPath() … … 2919 2921 txt = wx.StaticText(self,wx.ID_ANY,item+" ") 2920 2922 fbox.Add(txt,(0,i+1)) 2921 # if self.cifdic.get(item):2922 # df = self.cifdic[item].get('_definition')2923 # if df:2924 # txt.SetToolTipString(G2IO.trim(df))2925 # but = CIFdefHelp(self,2926 # "Definition for "+item+":\n\n"+G2IO.trim(df),2927 # self.parent,2928 # self.parent.helptxt)2929 # fbox.Add(but,(1,i+1),flag=wx.ALIGN_CENTER)2930 2923 for j,val in enumerate(self.cifblk[item]): 2931 2924 ent = self.CIFEntryWidget(self.cifblk[item],j,item) … … 2947 2940 for i in range(rows): 2948 2941 txt = wx.StaticText(self,wx.ID_ANY,str(i+1)) 2949 fbox.Add(txt,(i+ 2,0))2942 fbox.Add(txt,(i+1,0)) 2950 2943 line = wx.StaticLine(self,wx.ID_ANY, size=(-1,3), style=wx.LI_HORIZONTAL) 2951 2944 vbox.Add(line, 0, wx.EXPAND|wx.ALL, 10)
Note: See TracChangeset
for help on using the changeset viewer.