Changeset 1722
- Timestamp:
- Mar 16, 2015 10:38:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrls.py
r1719 r1722 2088 2088 sizer1.Add(self.dataLoc,0,WACV) 2089 2089 sizer.Add(sizer1) 2090 label = wx.StaticText( 2091 pnl, wx.ID_ANY, 2092 'Tutorials and Exercise files will be downloaded to:' 2093 ) 2094 sizer.Add(label, 0, wx.ALIGN_LEFT|wx.ALL, 5) 2095 self.TutorialLabel = wx.StaticText(pnl,wx.ID_ANY,'') 2096 sizer.Add(self.TutorialLabel, 0, wx.ALIGN_LEFT|wx.EXPAND, 5) 2097 self.ExerciseLabel = wx.StaticText(pnl,wx.ID_ANY,'') 2098 self.ShowTutorialPath() 2099 sizer.Add(self.ExerciseLabel, 0, wx.ALIGN_LEFT|wx.EXPAND, 5) 2090 2100 self.listbox = wx.ListBox(pnl, wx.ID_ANY, size=(450, 100), style=wx.LB_SINGLE) 2091 2101 self.listbox.Bind(wx.EVT_LISTBOX, self.OnTutorialSelected) … … 2143 2153 ''') 2144 2154 return 2145 self.dataLoc.SetLabel(tutorialPath)2155 #self.dataLoc.SetLabel(tutorialPath) 2146 2156 self.EndModal(wx.ID_OK) 2147 2157 wx.BeginBusyCursor() … … 2172 2182 raise Exception("How did this happen!") 2173 2183 wx.EndBusyCursor() 2184 def ShowTutorialPath(self): 2185 'Show the help and exercise directory names' 2186 self.TutorialLabel.SetLabel('\t'+ 2187 os.path.join(tutorialPath,"help") + 2188 ' (tutorials)') 2189 self.ExerciseLabel.SetLabel('\t'+ 2190 os.path.join(tutorialPath,"Exercises") + 2191 ' (exercises)') 2174 2192 def ValidateTutorialDir(self,fullpath=tutorialPath,baseURL=G2BaseURL): 2175 2193 '''Load help to new directory or make sure existing directory looks correctly set up … … 2239 2257 G2MessageBox(self.frame,msg) 2240 2258 return 2241 self.ValidateTutorialDir(pth,G2BaseURL) 2242 try: 2259 try: 2243 2260 self.ValidateTutorialDir(pth,G2BaseURL) 2244 2261 tutorialPath = pth … … 2253 2270 ''') 2254 2271 self.dataLoc.SetLabel(tutorialPath) 2272 self.ShowTutorialPath() 2255 2273 2256 2274 if __name__ == '__main__':
Note: See TracChangeset
for help on using the changeset viewer.