本文整理汇总了Python中wx.PySimpleApp方法的典型用法代码示例。如果您正苦于以下问题:Python wx.PySimpleApp方法的具体用法?Python wx.PySimpleApp怎么用?Python wx.PySimpleApp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wx
的用法示例。
在下文中一共展示了wx.PySimpleApp方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_Help2
# 需要导入模块: import wx [as 别名]
# 或者: from wx import PySimpleApp [as 别名]
def on_Help2(self, event):
#-----------------------------------------------
# Event handler for the Help button.
# Alternate method that uses HTML_Help_Window
# class, defined below.
#-----------------------------------------------
app = wx.PySimpleApp()
frame = HTML_Help_Window(parent=None,
title="HTML Help System",
html_file=self.help_file)
frame.Show()
app.MainLoop()
# on_Help2()
#----------------------------------------------------------------
示例2: show_hide_aui_pane_info
# 需要导入模块: import wx [as 别名]
# 或者: from wx import PySimpleApp [as 别名]
def show_hide_aui_pane_info(self, name):
if self.aui_manager.GetPane(name).IsShown():
self.aui_manager.GetPane(name).Hide()
else:
self.aui_manager.GetPane(name).Show()
self.aui_manager.Update()
#~ class application(wx.PySimpleApp):
示例3: get_app_wx
# 需要导入模块: import wx [as 别名]
# 或者: from wx import PySimpleApp [as 别名]
def get_app_wx(*args, **kwargs):
"""Create a new wx app or return an exiting one."""
import wx
app = wx.GetApp()
if app is None:
if 'redirect' not in kwargs:
kwargs['redirect'] = False
app = wx.PySimpleApp(*args, **kwargs)
return app
示例4: main
# 需要导入模块: import wx [as 别名]
# 或者: from wx import PySimpleApp [as 别名]
def main():
os.chdir(APP_PATH)
# app = wx.PySimpleApp() : Deprecated
app = wx.App(False)
controller = GoSyncController()
controller.Center()
controller.Show()
app.MainLoop()
示例5: buildWindow
# 需要导入模块: import wx [as 别名]
# 或者: from wx import PySimpleApp [as 别名]
def buildWindow(self):
app = wx.PySimpleApp()
module_name = os.path.split(sys.argv[0])[-1]
frame = wx.Frame(None, -1, module_name, size=(640, 480))
panel = advanced_config.AdvancedConfigPanel(frame, ClientApp(self.parser))
frame.Show()
app.MainLoop()
示例6: CreateApplication
# 需要导入模块: import wx [as 别名]
# 或者: from wx import PySimpleApp [as 别名]
def CreateApplication(self):
BeremizAppType = wx.App if wx.VERSION >= (3, 0, 0) else wx.PySimpleApp
class BeremizApp(BeremizAppType):
def OnInit(_self): # pylint: disable=no-self-argument
self.ShowSplashScreen()
return True
self.app = BeremizApp(redirect=self.debug)
self.app.SetAppName('beremiz')
if wx.VERSION < (3, 0, 0):
wx.InitAllImageHandlers()
示例7: getlanguageDict
# 需要导入模块: import wx [as 别名]
# 或者: from wx import PySimpleApp [as 别名]
def getlanguageDict():
languageDict = {}
getSupportedLanguageDict('Beremiz')
if wx.VERSION >= (3, 0, 0):
_app = wx.App()
else:
_app = wx.PySimpleApp()
for lang in [x for x in dir(wx) if x.startswith("LANGUAGE")]:
i = wx.Locale(wx.LANGUAGE_DEFAULT).GetLanguageInfo(getattr(wx, lang))
if i:
languageDict[i.CanonicalName] = i.Description
return languageDict
示例8: Get_Input_Vars
# 需要导入模块: import wx [as 别名]
# 或者: from wx import PySimpleApp [as 别名]
def Get_Input_Vars():
#------------------------------------------------------
# Note: This is for testing. It creates two dialogs
# that are identical, on top of each other.
# Change values in the top one (the child) and
# then click on its Start button. The child
# dialog closes. Now click on the Help button
# of the remaining (parent) to print out some
# of the stored values. Later on, the parent
# will be the TopoFlow main wizard.
#------------------------------------------------------
# Note: You need to comment out the last few lines
# in this file before using this function.
#------------------------------------------------------
#----------------------------------
# Open a TopoFlow input dialog as
# the "main program window"
#----------------------------------
app = wx.PySimpleApp()
frame1 = TF_Input_Dialog(xml_file="xml/snowmelt_degree_day.xml")
frame1.Show()
#--------------------------------------------------
# Open a 2nd dialog that has frame1 as its parent
# and which will store its values into its parent
# before it is destroyed.
#--------------------------------------------------
frame2 = TF_Input_Dialog(parent=frame1, \
xml_file="xml/snowmelt_degree_day.xml")
frame2.Show()
#-----------------------
# Start the event loop
#-----------------------
app.MainLoop()
# Get_Input_Vars()
#-------------------------------------------------------------
#---------------------------------------
# Support two different usage options
#---------------------------------------