本文整理汇总了Python中component.Manager.getPanelData方法的典型用法代码示例。如果您正苦于以下问题:Python Manager.getPanelData方法的具体用法?Python Manager.getPanelData怎么用?Python Manager.getPanelData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类component.Manager
的用法示例。
在下文中一共展示了Manager.getPanelData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from component import Manager [as 别名]
# 或者: from component.Manager import getPanelData [as 别名]
def __init__(self, parent):
if wx.Platform == "__WXGTK__":
wx.Panel.__init__(self, parent, -1, style=wx.RAISED_BORDER | wx.WANTS_CHARS)
else:
wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)
self.bg = wx.Colour(115, 180, 215)
# Top sizer
sizer = wx.BoxSizer(wx.VERTICAL)
# Use toolbook or foldpanelbar depending of preferences
if g.conf.toolPanelType == "TB":
self.tp = wx.Toolbook(self, -1, style=wx.BK_TOP)
sizer.Add(self.tp, 1, wx.EXPAND)
# Image list
thumbSize = g.conf.toolThumbSize
il = wx.ImageList(thumbSize, thumbSize, True)
# Default Id 0
il.Add(images.getToolPanel_DefaultImage().Scale(thumbSize, thumbSize).ConvertToBitmap())
self.il = il
self.tp.AssignImageList(il)
elif g.conf.toolPanelType == "FPB":
self.tp = fpb.FoldPanelBar(
self, -1, wx.DefaultPosition, wx.DefaultSize, fpb.FPB_DEFAULT_STYLE | fpb.FPB_VERTICAL
)
sizer.Add(self.tp, 1, wx.EXPAND)
self.panels = []
for name in Manager.panelNames:
panelData = Manager.getPanelData(name)
if not panelData:
continue
try:
im = Manager.panelImages[name]
imageId = il.Add(im.Scale(thumbSize, thumbSize).ConvertToBitmap())
except:
imageId = 0
panel = self.AddPanel(name)
self.panels.append(panel)
for pos, span, comp, bmp in panelData:
self.AddButton(panel, pos, span, comp.id, bmp, comp.klass)
panel.Fit()
if g.conf.toolPanelType == "TB":
self.tp.AddPage(panel, "", imageId=imageId)
else:
p = self.tp.AddFoldPanel(name, collapsed=False)
p.SetBackgroundColour(self.bg)
panel.Reparent(p)
p.AddWindow(panel, fpb.FPB_ALIGN_WIDTH)
self.tp.Fit()
self.SetSizerAndFit(sizer)
# Allow to be resized in horizontal direction only
# Events
# wx.EVT_KEY_DOWN(self, self.OnKeyDown)
# wx.EVT_KEY_UP(self, self.OnKeyUp)
self.drag = None