本文整理汇总了Python中miro.plat.frontends.widgets.base.Container类的典型用法代码示例。如果您正苦于以下问题:Python Container类的具体用法?Python Container怎么用?Python Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Container类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
Container.__init__(self)
self.view = RBSplitView.alloc().initWithFrame_(NSRect((0,0), (800,600)))
self.view.setVertical_(YES)
self.delegate = SplitterDelegate.alloc().initWithSplitter_(self)
self.view.setDelegate_(self.delegate)
self.left = None
self.left_view = MiroSplitSubview.alloc().init()
self.left_view.setIdentifier_('left')
self.view.addSubview_atPosition_(self.left_view, 0)
self.right = None
self.right_view = MiroSplitSubview.alloc().init()
self.right_view.setIdentifier_('right')
self.view.addSubview_atPosition_(self.right_view, 1)
divider = NSImage.alloc().initWithSize_(NSSize(1.0, 1.0))
divider.lockFocus()
NSColor.clearColor().set()
NSRectFill(NSRect((0.0, 0.0), (1.0, 1.0)))
divider.unlockFocus()
divider.setFlipped_(YES)
self.view.setDivider_(divider)
示例2: disable
def disable(self, row=None, column=None):
Container.disable(self)
if row != None and column != None:
if self._cells[column, row]:
self._cells[column, row].disable()
elif row != None:
for mem in self._cells.row(row):
if mem: mem.disable()
elif column != None:
for mem in self._cells.column(column):
if mem: mem.disable()
else:
for mem in self._cells:
if mem: mem.disable()
示例3: enable
def enable(self):
Container.enable(self)
for mem in self.children:
mem.enable()