当前位置: 首页>>代码示例>>Python>>正文


Python wx.BOTH属性代码示例

本文整理汇总了Python中wx.BOTH属性的典型用法代码示例。如果您正苦于以下问题:Python wx.BOTH属性的具体用法?Python wx.BOTH怎么用?Python wx.BOTH使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.BOTH属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent, id, title):
		super().__init__(parent, id, title=title)
		main_sizer = self.main_sizer = wx.BoxSizer(wx.VERTICAL)
		self.client_or_server = wx.RadioBox(self, wx.ID_ANY, choices=(_("Client"), _("Server")), style=wx.RA_VERTICAL)
		self.client_or_server.Bind(wx.EVT_RADIOBOX, self.on_client_or_server)
		self.client_or_server.SetSelection(0)
		main_sizer.Add(self.client_or_server)
		choices = [_("Control another machine"), _("Allow this machine to be controlled")]
		self.connection_type = wx.RadioBox(self, wx.ID_ANY, choices=choices, style=wx.RA_VERTICAL)
		self.connection_type.SetSelection(0)
		main_sizer.Add(self.connection_type)
		self.container = wx.Panel(parent=self)
		self.panel = ClientPanel(parent=self.container)
		main_sizer.Add(self.container)
		buttons = self.CreateButtonSizer(wx.OK | wx.CANCEL)
		main_sizer.Add(buttons, flag=wx.BOTTOM)
		main_sizer.Fit(self)
		self.SetSizer(main_sizer)
		self.Center(wx.BOTH | WX_CENTER)
		ok = wx.FindWindowById(wx.ID_OK, self)
		ok.Bind(wx.EVT_BUTTON, self.on_ok) 
开发者ID:NVDARemote,项目名称:NVDARemote,代码行数:23,代码来源:dialogs.py

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, -1, title, size=(725, 650),
                          style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
        self._config = FlashConfig.load(self._get_config_file_path())

        self._build_status_bar()
        self._set_icons()
        self._build_menu_bar()
        self._init_ui()

        sys.stdout = RedirectText(self.console_ctrl)

        self.Centre(wx.BOTH)
        self.Show(True)
        print("Connect your device")
        print("\nIf you chose the serial port auto-select feature you might need to ")
        print("turn off Bluetooth") 
开发者ID:marcelstoer,项目名称:nodemcu-pyflasher,代码行数:19,代码来源:Main.py

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent):

        wx.Dialog.__init__(self, parent, wx.ID_ANY, "Manual Entry", size=(650, 600))
        self.panel = wx.Panel(self, wx.ID_ANY)

        self.mainSizer = wx.BoxSizer(wx.VERTICAL)

        self.folios = self.fetchFolios()

        self.lblFolioD = wx.StaticText(self.panel, label="Folio (Debit)")
        self.folioComboD = wx.ComboBox(self.panel, choices=list(self.folios.keys()))

        self.mainSizer.Add(self.lblFolioD)
        self.mainSizer.Add(self.folioComboD)

        self.SetSizer(self.mainSizer)
        self.Layout()
        self.mainSizer.Fit(self.panel)
        self.Centre(wx.BOTH)

        self.Bind(wx.EVT_CLOSE, self.OnQuit)

        self.Show() 
开发者ID:104H,项目名称:HH---POS-Accounting-and-ERP-Software,代码行数:25,代码来源:testingManualEntryPanel.py

示例4: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent, msg, caption, pos = wx.DefaultPosition, size = (500,300)):
        from wx.lib.layoutf import Layoutf
        wx.Dialog.__init__(self, parent, -1, caption, pos, size)
        text = wx.TextCtrl(self, -1, msg, wx.DefaultPosition,
                             wx.DefaultSize, wx.TE_MULTILINE | wx.TE_READONLY)
        text.SetFont(g.modernFont())
        dc = wx.WindowDC(text)
        # !!! possible bug - GetTextExtent without font returns sysfont dims
        w, h = dc.GetFullTextExtent(' ', g.modernFont())[:2]
        ok = wx.Button(self, wx.ID_OK, "OK")
        text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
        text.SetSize((w * 80 + 30, h * 40))
        text.ShowPosition(1)
        ok.SetConstraints(Layoutf('b=b5#1;x%w50#1;w!80;h!25', (self,)))
        self.SetAutoLayout(True)
        self.Fit()
        self.CenterOnScreen(wx.BOTH)

################################################################################

# Event handler for using during location 
开发者ID:andreas-p,项目名称:admin4,代码行数:23,代码来源:xrced.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"控制台日志", pos=wx.DefaultPosition, size=wx.Size(500, 500),
                           style=wx.DEFAULT_DIALOG_STYLE)

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        sizer_global = wx.BoxSizer(wx.VERTICAL)
        self.textctrl_log = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size(427, 381),
                                           wx.TE_AUTO_URL | wx.TE_MULTILINE | wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)

        # self.listctrl_log = ListCtrl_DLLog(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LC_REPORT)
        sizer_global.Add(self.textctrl_log, 1, wx.ALL | wx.EXPAND, 5)

        self.SetSizer(sizer_global)
        self.Layout()

        self.Centre(wx.BOTH)
        self.Bind(wx.EVT_CLOSE, self.onClose) 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:20,代码来源:dialog_dllog.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"链接浏览窗口", pos=wx.DefaultPosition, size=wx.Size(500, 500),
                           style=wx.DEFAULT_DIALOG_STYLE)

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        sizer_global = wx.BoxSizer(wx.VERTICAL)

        self.listctrl_links = ListCtrl_CopyLink(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LC_REPORT)
        sizer_global.Add(self.listctrl_links, 1, wx.ALL | wx.EXPAND, 5)

        self.SetSizer(sizer_global)
        self.Layout()

        self.Centre(wx.BOTH)
        self.Bind(wx.EVT_CLOSE, self.onClose) 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:18,代码来源:dialog_copylink.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Encrypted Files", pos = wx.DefaultPosition, size = wx.Size( 600,400 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )

		self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )

		BodySizer = wx.BoxSizer( wx.VERTICAL )

		self.m_panel4 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		TextCtrlSizer = wx.BoxSizer( wx.VERTICAL )

		self.EncryptedFilesTextCtrl = wx.TextCtrl( self.m_panel4, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_DONTWRAP|wx.TE_MULTILINE|wx.TE_READONLY )
		TextCtrlSizer.Add( self.EncryptedFilesTextCtrl, 1, wx.ALL|wx.EXPAND, 5 )


		self.m_panel4.SetSizer( TextCtrlSizer )
		self.m_panel4.Layout()
		TextCtrlSizer.Fit( self.m_panel4 )
		BodySizer.Add( self.m_panel4, 1, wx.EXPAND |wx.ALL, 5 )


		self.SetSizer( BodySizer )
		self.Layout()

		self.Centre( wx.BOTH ) 
开发者ID:sithis993,项目名称:Crypter,代码行数:26,代码来源:GuiAbsBase.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__( self, parent ):
        # Settings
        wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = "Pigrow Data Display", pos = wx.DefaultPosition, style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
        self.Bind(wx.EVT_SIZE, self.resize_window)
        MainApp.display_panel = display_pnl(self)

        # Sizers
        main_sizer = wx.BoxSizer(wx.HORIZONTAL)
        main_sizer.Add(MainApp.display_panel, 0, wx.EXPAND)
        MainApp.window_sizer = wx.BoxSizer(wx.VERTICAL)
        MainApp.window_sizer.Add(main_sizer, 0, wx.EXPAND)
        #MainApp.window_sizer.Fit(self)
        self.SetSizer(MainApp.window_sizer)
        MainApp.window_self = self
        self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
        self.Layout()
        self.Centre( wx.BOTH ) 
开发者ID:Pragmatismo,项目名称:Pigrow,代码行数:19,代码来源:local_display.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, wx.ID_ANY, "About NodeMCU PyFlasher")
        html = HtmlWindow(self, wx.ID_ANY, size=(420, -1))
        if "gtk2" in wx.PlatformInfo or "gtk3" in wx.PlatformInfo:
            html.SetStandardFonts()
        txt = self.text.format(self._get_bundle_dir(), __version__)
        html.SetPage(txt)
        ir = html.GetInternalRepresentation()
        html.SetSize((ir.GetWidth() + 25, ir.GetHeight() + 25))
        self.SetClientSize(html.GetSize())
        self.CentreOnParent(wx.BOTH) 
开发者ID:marcelstoer,项目名称:nodemcu-pyflasher,代码行数:13,代码来源:About.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"POS and Accounting", pos = wx.DefaultPosition, size = wx.Size( 676,460 ), style = wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE|wx.TAB_TRAVERSAL )
		
		self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
		
		bSizer1 = wx.BoxSizer( wx.VERTICAL )
		
		self.panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		
		self.mainSizer = wx.BoxSizer( wx.VERTICAL )
		
		self.userName = wx.TextCtrl (self.panel, value="admin")
		self.mainSizer.Add( self.userName, 0, wx.ALIGN_CENTRE|wx.ALL, 5 )
		
		self.passwd = wx.TextCtrl (self.panel, value="admin")
		self.mainSizer.Add( self.passwd, 0, wx.ALIGN_CENTRE|wx.ALL, 5 )
		
		self.lgnButton = wx.Button(self.panel, label="Login")
		self.mainSizer.Add( self.lgnButton, 0, wx.ALIGN_CENTRE|wx.ALL, 5 )
		
		self.panel.SetSizer( self.mainSizer )
		
		bSizer1.Add( self.panel, 1, wx.EXPAND |wx.ALL, 5 )
		
		self.SetSizer( bSizer1 )
		self.Layout()
		
		self.Centre( wx.BOTH )
		
		self.lgnButton.Bind(wx.EVT_BUTTON, self.attemptLogin) 
开发者ID:104H,项目名称:HH---POS-Accounting-and-ERP-Software,代码行数:32,代码来源:loginScreen.py

示例11: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__( self, parent ):
        wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"InteractiveHtmlBom", pos = wx.DefaultPosition, size = wx.Size( 463,497 ), style = wx.DEFAULT_DIALOG_STYLE|wx.STAY_ON_TOP|wx.BORDER_DEFAULT )

        self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )


        self.Centre( wx.BOTH ) 
开发者ID:openscopeproject,项目名称:InteractiveHtmlBom,代码行数:9,代码来源:dialog_base.py

示例12: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent, val, maxval):
        wx.Dialog.__init__(self, parent, id = wx.ID_ANY,
                   title = u"Slide", pos = defPos, size = (70, 340),
                   style = wx.CLOSE_BOX|wx.DEFAULT_DIALOG_STYLE)
        boxszr = wx.BoxSizer(wx.HORIZONTAL)
        self.slider = wx.Slider( self, wx.ID_ANY, val, 1, maxval,
                                   defPos, wx.Size(-1, 300),
                                   wx.SL_RIGHT|wx.SL_LABELS|wx.SL_INVERSE)
        boxszr.Add( self.slider, 0, 0, 5 )
        self.slider.Bind(wx.EVT_SCROLL, self.scrolling)
        self.SetSizer(boxszr)
        self.Layout()
        self.Centre(wx.BOTH) 
开发者ID:pymupdf,项目名称:PyMuPDF-Utilities,代码行数:15,代码来源:PDFoutline.py

示例13: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, dialogname, onok=None):
        pcbnew_frame = \
            filter(lambda w: w.GetTitle().startswith('Pcbnew'), wx.GetTopLevelWindows())[0]

        wx.Dialog.__init__(self, pcbnew_frame,
                           id=wx.ID_ANY,
                           title=dialogname,
                           pos=wx.DefaultPosition)

        self.ok_cbs = []
        if onok:
            self.ok_cbs.append(onok)

        self.main_sizer = wx.BoxSizer(wx.VERTICAL)
        self.SetSizer(self.main_sizer)


        # add ok and cancel buttons.
        sizer_ok_cancel = wx.BoxSizer(wx.HORIZONTAL)
        self.main_sizer.Add(item=sizer_ok_cancel, proportion=0, flag=wx.EXPAND)

        ok_button = wx.Button(self, wx.ID_OK, u"OK", wx.DefaultPosition, wx.DefaultSize, 0)
        ok_button.SetDefault()
        sizer_ok_cancel.Add(item=ok_button, proportion=1) #, flag=wx.ALL, border=5)
        ok_button.Bind(wx.EVT_BUTTON, self.OnOK)

        cancel_button = wx.Button(self, wx.ID_CANCEL, u"Cancel", wx.DefaultPosition, wx.DefaultSize, 0)
        sizer_ok_cancel.Add(cancel_button, 1) #, wx.ALL, 5)


        self.ok_cancel_sizer_index = 0
        #self.Layout()
        self.Centre(wx.BOTH)

    # when the user clicks ok, we want to save stuff like directories used.... 
开发者ID:mmccoo,项目名称:kicad_mmccoo,代码行数:37,代码来源:DialogUtils.py

示例14: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def __init__(self, parent, title, total_byte, dlm):
        wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=title, pos=wx.DefaultPosition, size=wx.DefaultSize,
                           style=wx.DEFAULT_DIALOG_STYLE)
        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        self.global_sizer = wx.BoxSizer(wx.VERTICAL)

        self.gauge_progress = wx.Gauge(self, wx.ID_ANY, 10000, wx.DefaultPosition, wx.DefaultSize, wx.GA_HORIZONTAL)
        self.gauge_progress.SetValue(524)
        self.global_sizer.Add(self.gauge_progress, 0, wx.ALL | wx.EXPAND, 5)

        sizer_info = wx.BoxSizer(wx.HORIZONTAL)

        self.text_percent = wx.StaticText(self, wx.ID_ANY, u"0.0%", wx.DefaultPosition, wx.DefaultSize,
                                            wx.ALIGN_LEFT)
        self.text_percent.Wrap(-1)

        sizer_info.Add(self.text_percent, 1, wx.ALL, 5)

        self.total_byte = total_byte
        self.format_int = '%0' + str(len(str(self.total_byte))) + 'd/%0' + str(len(str(self.total_byte))) + 'd'

        self.text_progress = wx.StaticText(self, wx.ID_ANY, self.format_int % (0, self.total_byte), wx.DefaultPosition, wx.DefaultSize,
                                            wx.ALIGN_RIGHT)
        self.text_progress.Wrap(-1)

        sizer_info.Add(self.text_progress, 1, wx.ALIGN_RIGHT | wx.ALL, 5)

        self.global_sizer.Add(sizer_info, 1, wx.EXPAND, 5)

        self.SetSizer(self.global_sizer)
        self.Layout()
        self.global_sizer.Fit(self)

        self.Centre(wx.BOTH)
        self.Bind(wx.EVT_CLOSE, self.onClose)

        self.timer = wx.Timer()

        self.timer.SetOwner(self, wx.ID_ANY)
        self.dlm = dlm 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:43,代码来源:dialog_gettool.py

示例15: CreateWindow

# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTH [as 别名]
def CreateWindow(self, parent):
        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
        self.SetMinSize(wx.Size(250, 250))
        self.SetBackgroundColour(wx.Colour(240, 240, 240))
        if os.path.exists(ICO_PATH):
            self.SetIcon(wx.Icon(ICO_PATH))

        self.CreateMenuBar()
        self.CreateRelayButtons()
        self.CreateStatusbar()

        self.Layout()
        self.Centre(wx.BOTH) 
开发者ID:Erriez,项目名称:R421A08-rs485-8ch-relay-board,代码行数:15,代码来源:wxpython_toggle.py


注:本文中的wx.BOTH属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。