本文整理汇总了Python中wx.lib.scrolledpanel.ScrolledPanel方法的典型用法代码示例。如果您正苦于以下问题:Python scrolledpanel.ScrolledPanel方法的具体用法?Python scrolledpanel.ScrolledPanel怎么用?Python scrolledpanel.ScrolledPanel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wx.lib.scrolledpanel
的用法示例。
在下文中一共展示了scrolledpanel.ScrolledPanel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from wx.lib import scrolledpanel [as 别名]
# 或者: from wx.lib.scrolledpanel import ScrolledPanel [as 别名]
def __init__(self, *args, **kwds):
scrolled.ScrolledPanel.__init__(self, *args, **kwds)
# Create pages on MenuPanel
nb = wx.Notebook(self,-1)
self.stats_page = StatisticsPage(nb)
nb.AddPage(self.stats_page, "Continuous Statistics")
sizer = wx.BoxSizer()
sizer.Add(nb, 1, wx.EXPAND)
self.SetSizer(sizer)
self.SetupScrolling()
示例2: __init__
# 需要导入模块: from wx.lib import scrolledpanel [as 别名]
# 或者: from wx.lib.scrolledpanel import ScrolledPanel [as 别名]
def __init__(self, parent, mainwin, ID):
""" mainwin is the main panel so we can bind buttons to actions in the main frame """
scrolled.ScrolledPanel.__init__(self, parent)
statusTitle = wx.StaticText(self, wx.ID_ANY, ID)
font = wx.Font(12,wx.DEFAULT, wx.NORMAL,wx.NORMAL)
statusTitle.SetFont(font)
self.StatusTextBox = wx.TextCtrl(self,wx.ID_ANY,"",style=wx.TE_READONLY|wx.TE_MULTILINE)
#self.StatusTextBox.Size.SetHeight(500)
self.SaveBtn = wx.Button(self,wx.ID_ANY,"Save Text to file",size=(100,-1))
self.Bind(wx.EVT_BUTTON,self.OnSave,self.SaveBtn)
panel_sizer = wx.BoxSizer(wx.VERTICAL)
panel_sizer.Add((-1,10),0,wx.EXPAND)
panel_sizer.Add(statusTitle,0,wx.EXPAND|wx.LEFT,border=20)
panel_sizer.Add((-1,10),0,wx.EXPAND)
panel_sizer.Add(self.StatusTextBox,1,wx.EXPAND|wx.LEFT|wx.RIGHT,border=40)
panel_sizer.Add((-1,10),0,wx.EXPAND)
panel_sizer.Add(self.SaveBtn,0,wx.EXPAND|wx.LEFT|wx.RIGHT,border=40)
panel_sizer.Add((-1,20),0,wx.EXPAND)
self.SetSizer(panel_sizer)
self.SetupScrolling()
self.Layout()
示例3: __init__
# 需要导入模块: from wx.lib import scrolledpanel [as 别名]
# 或者: from wx.lib.scrolledpanel import ScrolledPanel [as 别名]
def __init__(self, parent):
SP.ScrolledPanel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER)
self.SetupScrolling(scroll_x=True, scroll_y=True, scrollToTop=False)
self.Layout()