updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
"""
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.activexwrapper import MakeActiveXClass
|
||||
|
||||
import win32com.client.gencache
|
||||
if wxPlatform == '__WXMSW__':
|
||||
from wxPython.lib.activexwrapper import MakeActiveXClass
|
||||
import win32com.client.gencache
|
||||
|
||||
try:
|
||||
acrobat = win32com.client.gencache.EnsureModule('{CA8A9783-280D-11CF-A24D-444553540000}', 0x0, 1, 3)
|
||||
except:
|
||||
raise ImportError("Can't load PDF.OCX, install Acrobat 4.0")
|
||||
|
||||
try:
|
||||
acrobat = win32com.client.gencache.EnsureModule('{CA8A9783-280D-11CF-A24D-444553540000}', 0x0, 1, 3)
|
||||
except:
|
||||
raise ImportError("Can't load PDF.OCX, install Acrobat 4.0")
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -77,8 +79,14 @@ class TestPanel(wxPanel):
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
if wxPlatform == '__WXMSW__':
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
else:
|
||||
dlg = wxMessageDialog(frame, 'This demo only works on MSW.',
|
||||
'Sorry', wxOK | wxICON_INFORMATION)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
|
||||
|
||||
overview = __doc__
|
||||
|
@@ -2,14 +2,15 @@
|
||||
"""
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.activexwrapper import MakeActiveXClass
|
||||
|
||||
import win32com.client.gencache
|
||||
if wxPlatform == '__WXMSW__':
|
||||
from wxPython.lib.activexwrapper import MakeActiveXClass
|
||||
import win32com.client.gencache
|
||||
|
||||
try:
|
||||
browserModule = win32com.client.gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
|
||||
except:
|
||||
raise ImportError("IE4 or greater does not appear to be installed.")
|
||||
try:
|
||||
browserModule = win32com.client.gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
|
||||
except:
|
||||
raise ImportError("IE4 or greater does not appear to be installed.")
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -139,8 +140,14 @@ class TestPanel(wxWindow):
|
||||
# for the demo framework...
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log, frame)
|
||||
return win
|
||||
if wxPlatform == '__WXMSW__':
|
||||
win = TestPanel(nb, log, frame)
|
||||
return win
|
||||
else:
|
||||
dlg = wxMessageDialog(frame, 'This demo only works on MSW.',
|
||||
'Sorry', wxOK | wxICON_INFORMATION)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
|
||||
|
||||
overview = __doc__
|
||||
|
@@ -9,12 +9,14 @@ class TestPanel(wxPanel):
|
||||
def __init__(self, parent, ID, log):
|
||||
wxPanel.__init__(self, parent, ID)
|
||||
self.log = log
|
||||
self.fbb = FileBrowseButton(self, -1, wxPoint(20,20), wxSize(350, -1),
|
||||
self.fbb = FileBrowseButton(self, -1, wxPoint(20,20), wxSize(450, -1),
|
||||
changeCallback = self.fbbCallback)
|
||||
self.fbbh = FileBrowseButtonWithHistory(self, -1, wxPoint(20, 50),
|
||||
wxSize(350, -1),
|
||||
changeCallback = self.fbbhCallback)
|
||||
self.fbbh.SetHistory([])
|
||||
wxSize(450, -1),
|
||||
#changeCallback = self.fbbhCallback
|
||||
)
|
||||
|
||||
self.fbbh.SetHistory(['You', 'can', 'put', 'some', 'file', 'names', 'here'])
|
||||
|
||||
|
||||
def fbbCallback(self, evt):
|
||||
@@ -22,11 +24,12 @@ class TestPanel(wxPanel):
|
||||
|
||||
|
||||
def fbbhCallback(self, evt):
|
||||
value = evt.GetString()
|
||||
self.log.write('FileBrowseButtonWithHistory: %s\n' % value)
|
||||
history = self.fbbh.GetHistory()
|
||||
history.append(value)
|
||||
self.fbbh.SetHistory(history)
|
||||
if hasattr(self, 'fbbh'):
|
||||
value = evt.GetString()
|
||||
self.log.write('FileBrowseButtonWithHistory: %s\n' % value)
|
||||
history = self.fbbh.GetHistory()
|
||||
history.append(value)
|
||||
self.fbbh.SetHistory(history)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user