本文整理汇总了Python中albow.Column.left方法的典型用法代码示例。如果您正苦于以下问题:Python Column.left方法的具体用法?Python Column.left怎么用?Python Column.left使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类albow.Column
的用法示例。
在下文中一共展示了Column.left方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update_side_panel
# 需要导入模块: from albow import Column [as 别名]
# 或者: from albow.Column import left [as 别名]
def update_side_panel(self, item):
if item == self.displayed_item:
return
self.displayed_item = item
if self.side_panel:
self.side_panel.set_parent(None)
items = [a for a in item[1]]
rows = []
if config.nbtTreeSettings.showAllTags.get():
meth = None
else:
meth = getattr(self, "build_%s" % item[3].lower(), None)
col = True
if meth and len(items) == 1:
rows = meth(items)
else:
height = 0
for itm in items:
t = itm.__class__.__name__
rows.append(Row([Label("Data Type:"), Label(t)], margin=1))
fields = self.build_field(itm)
for field in fields:
if type(field) == TextFieldWrapped:
field.set_size_for_text(self.side_panel_width)
row = Row([field], margin=1)
rows.append(row)
height += row.height
if height > self.displayRow.height:
col = False
if rows:
if col:
col = Column(rows, align="l", spacing=0, height=self.displayRow.height)
else:
col = ScrollPanel(
rows=rows,
align="l",
spacing=0,
height=self.displayRow.height,
draw_zebra=False,
inner_width=self.side_panel_width - scroll_button_size,
)
col.set_parent(self.displayRow)
col.top = self.displayRow.top
col.left = self.displayRow.subwidgets[0].right
col.bottom = self.displayRow.subwidgets[0].bottom
col.shrink_wrap()
self.side_panel = col