Upgrading further parts to wxPython4.

This commit is contained in:
Cas Cremers 2020-10-27 22:11:24 +01:00
parent 38a0fba212
commit 1e46eb3751
2 changed files with 15 additions and 2 deletions

View File

@ -185,7 +185,7 @@ class VerificationWindow(wx.Dialog):
sizer.Add(label, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL)
sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)
sizer.Add(line, 0, wx.GROW|wx.RIGHT|wx.TOP, 5)
btnsizer = wx.StdDialogButtonSizer()

View File

@ -94,6 +94,19 @@ The exact error was:
#---------------------------------------------------------------------------
global WXPYTHON4
global WXPYTHONINFREQ
WXPYTHON4 = False
WXPYTHONINFREQ = wx
try:
import wx.adv
WXPYTHON4 = True
WXPYTHONINFREQ = wx.adv
except ImportError:
pass
""" import externals """
import sys
import os
@ -139,7 +152,7 @@ def parseArgs():
#---------------------------------------------------------------------------
class MySplashScreen(wx.adv.SplashScreen):
class MySplashScreen(WXPYTHONINFREQ.SplashScreen):
def __init__(self,basedir):
path = os.path.join(basedir,"Images")
image = os.path.join(path,"scyther-splash.png")