本文整理汇总了Python中wx.DefaultSize方法的典型用法代码示例。如果您正苦于以下问题:Python wx.DefaultSize方法的具体用法?Python wx.DefaultSize怎么用?Python wx.DefaultSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wx
的用法示例。
在下文中一共展示了wx.DefaultSize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(self, parent, id=-1, colour=wx.BLACK,
pos=wx.DefaultPosition, size=wx.DefaultSize,
style = CLRP_DEFAULT_STYLE,
validator = wx.DefaultValidator,
name = "colourpickerwidget"):
wx.BitmapButton.__init__(self, parent, id, wx.Bitmap(1,1),
pos, size, style, validator, name)
self.SetColour(colour)
self.InvalidateBestSize()
self.SetInitialSize(size)
self.Bind(wx.EVT_BUTTON, self.OnButtonClick)
global _colourData
if _colourData is None:
_colourData = wx.ColourData()
_colourData.SetChooseFull(True)
grey = 0
for i in range(16):
c = wx.Colour(grey, grey, grey)
_colourData.SetCustomColour(i, c)
grey += 16
示例2: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(self,
parent,
ID=wx.NewId(),
pos=wx.DefaultPosition,
size=wx.DefaultSize,
style=0,
clientpanel=None):
"""Constructor. Create a smartcard tree control."""
BaseCardTreeCtrl.__init__(self, parent, ID, pos, size,
wx.TR_SINGLE | wx.TR_NO_BUTTONS,
clientpanel)
self.root = self.AddRoot("Smartcards")
self.SetPyData(self.root, None)
self.SetItemImage(self.root, self.fldrindex, wx.TreeItemIcon_Normal)
self.SetItemImage(
self.root, self.fldropenindex, wx.TreeItemIcon_Expanded)
self.Expand(self.root)
示例3: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(
self, parent,
id=-1,
pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_VRULES|wx.LC_SINGLE_SEL,
validator=wx.DefaultValidator,
columns=None,
sortOrder=None,
name=_("ProfileView"),
):
wx.ListCtrl.__init__(self, parent, id, pos, size, style, validator,
name)
if columns is not None:
self.columns = columns
if not sortOrder:
sortOrder = [(x.defaultOrder,x) for x in self.columns if x.sortDefault]
self.sortOrder = sortOrder or []
self.sorted = []
self.CreateControls()
示例4: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(
self, parent=None, id=-1,
title=_("Run Snake Run"),
pos=wx.DefaultPosition,
size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE|wx.CLIP_CHILDREN,
name= _("RunSnakeRun"),
config_parser=None,
):
"""Initialise the Frame"""
wx.Frame.__init__(self, parent, id, title, pos, size, style, name)
# TODO: toolbar for back, up, root, directory-view, percentage view
self.adapter = pstatsadapter.PStatsAdapter()
self.CreateControls(config_parser)
self.history = [] # set of (activated_node, selected_node) pairs...
icon = self.LoadRSRIcon()
if icon:
self.SetIcon( icon )
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(self, parent, **kwds):
super(PDFViewer, self).__init__(parent, **kwds)
paneCont = self.GetContentsPane()
self.buttonpanel = pdfButtonPanel(paneCont, wx.NewId(),
wx.DefaultPosition, wx.DefaultSize, 0)
self.buttonpanel.SetSizerProps(expand=True)
self.viewer = pdfViewer(paneCont, wx.NewId(), wx.DefaultPosition,
wx.DefaultSize,
wx.HSCROLL|wx.VSCROLL|wx.SUNKEN_BORDER)
self.viewer.SetSizerProps(expand=True, proportion=1)
# introduce buttonpanel and viewer to each other
self.buttonpanel.viewer = self.viewer
self.viewer.buttonpanel = self.buttonpanel
示例6: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [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
示例7: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(self, parentWin, size=wx.DefaultSize, style=wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT):
DragTreeCtrl.__init__(self, parentWin, "Server", size=size, style=style)
self.groups={}
self.nodes=[]
self.Bind(wx.EVT_RIGHT_DOWN, self.OnTreeRightClick)
self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnTreeActivate)
self.currentNode=None
self.currentItem=None
for groupName in adm.config.Read("ServerGroups", []):
self.addGroup(groupName)
for server in adm.config.getServers():
settings=adm.config.getServerSettings(server)
if settings:
logger.debug("Registering %s", server)
self.RegisterServer(settings, True)
else:
logger.debug("Registration for %s missing", server)
示例8: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [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)
示例9: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [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)
示例10: initTotal
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def initTotal(self, total):
self.total = total if total > 0 else 0
self.gauge_total = wx.Gauge(self, wx.ID_ANY, 10000, wx.DefaultPosition, wx.DefaultSize,
wx.GA_HORIZONTAL)
self.gauge_total.SetValue(0)
self.text_percent = wx.StaticText(self, wx.ID_ANY, '0%', wx.DefaultPosition,
wx.Size(42, -1), wx.ALIGN_RIGHT)
self.text_speed = wx.StaticText(self, wx.ID_ANY, '0B/s', wx.DefaultPosition, wx.Size(65, -1),
wx.ALIGN_RIGHT)
self.text_percent.Wrap(-1)
self.text_speed.Wrap(-1)
self.sizer_total.Add(self.text_percent, 0, wx.ALL, 5)
self.sizer_total.Add(self.gauge_total, 5, wx.ALL | wx.EXPAND, 5)
self.sizer_total.Add(self.text_speed, 0, wx.ALL, 5)
示例11: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(self, parent, pos, size = wx.DefaultSize):
ID = wx.NewId()
style = wx.LC_REPORT | wx.LC_VRULES | wx.LC_HRULES | wx.LC_SINGLE_SEL
wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
mons = [(i[0], i[1], i[2] - i[0], i[3] - i[1]) for i in [j[2] for j in Edm()]]
for j, header in enumerate(eg.text.General.monitorsHeader):
self.InsertColumn(j, header, wx.LIST_FORMAT_RIGHT)
self.SetColumnWidth(j, wx.LIST_AUTOSIZE_USEHEADER)
for i, mon in enumerate(mons):
self.InsertStringItem(i, str(i + 1))
self.SetStringItem(i, 1, str(mon[0]))
self.SetStringItem(i, 2, str(mon[1]))
self.SetStringItem(i, 3, str(mon[2]))
self.SetStringItem(i, 4, str(mon[3]))
rect = self.GetItemRect(0, wx.LIST_RECT_BOUNDS)
self.hh = rect[1] #header height
self.ih = rect[3] #item height
size = self.GetRealSize()
self.SetMinSize(size)
self.SetSize(size)
示例12: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(
self,
parent,
id=-1,
value="",
pos=wx.DefaultPosition,
size=wx.DefaultSize,
):
if isinstance(value, eg.Password):
self.password = value
else:
self.password = eg.Password(content=value)
wx.TextCtrl.__init__(
self,
parent,
id,
self.password.Get(),
pos,
size,
style=wx.TE_PASSWORD,
)
示例13: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [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 )
示例14: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [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 )
示例15: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DefaultSize [as 别名]
def __init__(self, parent):
"""Constructor, creating the reader toolbar."""
wx.ToolBar.__init__(
self,
parent,
pos=wx.DefaultPosition,
size=wx.DefaultSize,
style=wx.SIMPLE_BORDER | wx.TB_HORIZONTAL | wx.TB_FLAT | wx.TB_TEXT,
name='Reader Toolbar')
# create bitmaps for toolbar
tsize = (16, 16)
if None != ICO_READER:
bmpReader = wx.Bitmap(ICO_READER, wx.BITMAP_TYPE_ICO)
else:
bmpReader = wx.ArtProvider_GetBitmap(
wx.ART_HELP_BOOK, wx.ART_OTHER, tsize)
if None != ICO_SMARTCARD:
bmpCard = wx.Bitmap(ICO_SMARTCARD, wx.BITMAP_TYPE_ICO)
else:
bmpCard = wx.ArtProvider_GetBitmap(
wx.ART_HELP_BOOK, wx.ART_OTHER, tsize)
self.readercombobox = ReaderComboBox(self)
# create and add controls
self.AddSimpleTool(
10,
bmpReader,
"Select smart card reader",
"Select smart card reader")
self.AddControl(self.readercombobox)
self.AddSeparator()
self.AddSimpleTool(
20,
bmpCard, "Connect to smartcard",
"Connect to smart card")
self.AddSeparator()
self.Realize()