Changeset bc7bc839 in sasview for guiframe/pdfview.py
- Timestamp:
- Jul 25, 2011 3:24:12 PM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 486aa43
- Parents:
- 463eb76e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/pdfview.py
r60c7011 rbc7bc839 3 3 4 4 import wx 5 import os 5 6 if wx.Platform == '__WXMSW__': 6 7 from wx.lib.pdfwin import PDFWindow … … 16 17 17 18 self.parent = parent 19 self.path = path 18 20 sizer = wx.BoxSizer(wx.VERTICAL) 19 21 btnSizer = wx.BoxSizer(wx.HORIZONTAL) … … 27 29 btnSizer.Add(btn, proportion=1, flag=wx.EXPAND|wx.ALL, border=5) 28 30 29 self.pdf.LoadFile( path)31 self.pdf.LoadFile(self.path) 30 32 btn = wx.Button(self, wx.NewId(), "Previous Page") 31 33 self.Bind(wx.EVT_BUTTON, self.OnPrevPageButton, btn) … … 51 53 # make sure you have PDF files available on your drive 52 54 dlg = wx.FileDialog(self, wildcard="*.pdf") 55 dlg.SetDirectory(os.path.dirname(self.path)) 53 56 if dlg.ShowModal() == wx.ID_OK: 54 57 wx.BeginBusyCursor() 55 self.pdf.LoadFile(dlg.GetPath()) 56 58 file = dlg.GetPath() 59 self.pdf.LoadFile(file) 60 self.parent.SetTitle(os.path.basename(file.split('.')[0])) 57 61 wx.EndBusyCursor() 58 62 dlg.Destroy()
Note: See TracChangeset
for help on using the changeset viewer.