我们从Python开源项目中,提取了以下10个代码示例,用于说明如何使用wx.lib()。
def __init__(self, parent, log): self.log = log wx.Panel.__init__(self, parent, -1) from wx.lib.floatcanvas.ScreenShot import getScreenShotBitmap note1 = wx.StaticText(self, -1, errorText) note2 = wx.StaticText(self, -1, "This is what the FloatCanvas can look like:") S = wx.BoxSizer(wx.VERTICAL) S.Add((10, 10), 1) S.Add(note1, 0, wx.ALIGN_CENTER) S.Add(note2, 0, wx.ALIGN_CENTER | wx.BOTTOM, 4) S.Add(wx.StaticBitmap(self,-1,getScreenShotBitmap()),0,wx.ALIGN_CENTER) S.Add((10, 10), 1) self.SetSizer(S) self.Layout()
def OnButton(self, evt): DrawFrame = BuildDrawFrame() frame = DrawFrame(None, -1, "FloatCanvas Drawing Window",wx.DefaultPosition,(500,500)) #win = wx.lib.plot.TestFrame(self, -1, "PlotCanvas Demo") frame.Show() frame.DrawTest()
def OnHelpAbout(self, event): from wx.lib.dialogs import ScrolledMessageDialog about = ScrolledMessageDialog(self, __doc__, "About...") about.ShowModal()
def create_wxwindow(self): return self.initfn(wx.lib.scrolledpanel.ScrolledPanel)(self.parent, self.id, self.pos, self.size, self.style, self.name)
def create_wxwindow(self): import wx.lib.filebrowsebutton return self.initfn(wx.lib.filebrowsebutton.FileBrowseButton)( self.parent, self.id, self.pos, self.size, self.style, self.labelText, self.buttonText, self.toolTip, self.dialogTitle, self.startDirectory, self.initialValue, self.fileMask, self.fileMode, self.changeCallback, self.labelWidth, self.name)
def create_wxwindow(self): import wx.lib.masked return self.initfn(wx.lib.masked.NumCtrl)(self.parent, self.id, self.value, self.pos, self.size, self.style, self.validator, self.name, **self.kwargs)
def create_wxwindow(self): import wx.lib.masked return self.initfn(wx.lib.masked.TextCtrl)(self.parent, self.id, self.value, self.pos, self.size, self.style, self.validator, self.name, self.setupEventHandling, **self.kwargs)
def create_wxwindow(self): import wx.lib.agw.gradientbutton return self.initfn(wx.lib.agw.gradientbutton.GradientButton)(self.parent, self.id, self.bitmap, self.label, self.pos, self.size, self.style, validator=self.validator, name=self.name)
def create_wxwindow(self): from wx.lib.expando import ExpandoTextCtrl return self.initfn(ExpandoTextCtrl)(self.parent, self.id, self.value, self.pos, self.size, self.style, self.validator, self.name)
def create_wxwindow(self): from wx.lib import plot return self.initfn(plot.PlotCanvas)(self.parent, self.id, self.pos, self.style, self.name) ###################################################################### # Top-level windows.