本文整理汇总了Python中Block.Block.findBlockByName方法的典型用法代码示例。如果您正苦于以下问题:Python Block.findBlockByName方法的具体用法?Python Block.findBlockByName怎么用?Python Block.findBlockByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Block.Block
的用法示例。
在下文中一共展示了Block.findBlockByName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: wxSynchronizeWidget
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import findBlockByName [as 别名]
def wxSynchronizeWidget(self):
super (wxBoxContainer, self).wxSynchronizeWidget ()
try:
colorStyle = self.blockItem.colorStyle
except AttributeError:
pass
else:
self.SetBackgroundColour(colorStyle.backgroundColor.wxColor())
self.SetForegroundColour(colorStyle.foregroundColor.wxColor())
if self.blockItem.isShown:
sizer = self.GetSizer()
if not sizer:
sizer = wx.BoxSizer ({'Horizontal': wx.HORIZONTAL,
'Vertical': wx.VERTICAL} [self.blockItem.orientationEnum])
self.SetSizer (sizer)
sizer.Clear()
for childBlock in self.blockItem.childrenBlocks:
if childBlock.isShown and isinstance (childBlock, RectangularChild):
sizer.Add (childBlock.widget,
childBlock.stretchFactor,
wxRectangularChild.CalculateWXFlag(childBlock),
wxRectangularChild.CalculateWXBorder(childBlock))
self.Layout()
# @@@ this hack is so evil it belongs in a conrad novel
# to fix the mysterious negative sash position: bug 3497
# The sash goes negative after the MainCalendarContainer's Layout().
try:
blockName = self.blockItem.blockName
splitter = list(self.blockItem.childrenBlocks)[1]
splitterBlockName = splitter.blockName
except (AttributeError, IndexError):
pass
else:
if blockName == 'CalendarSummaryView' and \
splitterBlockName == 'MainCalendarCanvasSplitter' and \
splitter.widget.GetSashPosition() < 0:
allDay = Block.findBlockByName('AllDayEventsCanvas')
splitter.widget.MoveSash(allDay.widget.collapsedHeight)