本文整理汇总了Python中pyjamas.ui.HorizontalPanel.HorizontalPanel.setCellVerticalAlignment方法的典型用法代码示例。如果您正苦于以下问题:Python HorizontalPanel.setCellVerticalAlignment方法的具体用法?Python HorizontalPanel.setCellVerticalAlignment怎么用?Python HorizontalPanel.setCellVerticalAlignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.HorizontalPanel.HorizontalPanel
的用法示例。
在下文中一共展示了HorizontalPanel.setCellVerticalAlignment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import setCellVerticalAlignment [as 别名]
def __init__(self):
SimplePanel.__init__(self)
panel = HorizontalPanel(BorderWidth=1,
HorizontalAlignment=HasAlignment.ALIGN_CENTER,
VerticalAlignment=HasAlignment.ALIGN_MIDDLE,
Width="100%",
Height="200px")
part1 = Label("Part 1")
part2 = Label("Part 2")
part3 = Label("Part 3")
part4 = Label("Part 4")
panel.add(part1)
panel.add(part2)
panel.add(part3)
panel.add(part4)
panel.setCellWidth(part1, "10%")
panel.setCellWidth(part2, "70%")
panel.setCellWidth(part3, "10%")
panel.setCellWidth(part4, "10%")
panel.setCellVerticalAlignment(part3, HasAlignment.ALIGN_BOTTOM)
self.add(panel)
示例2: __init__
# 需要导入模块: from pyjamas.ui.HorizontalPanel import HorizontalPanel [as 别名]
# 或者: from pyjamas.ui.HorizontalPanel.HorizontalPanel import setCellVerticalAlignment [as 别名]
def __init__(self):
SimplePanel.__init__(self)
panel = HorizontalPanel()
panel.setBorderWidth(1)
panel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER)
panel.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE)
part1 = Label("Part 1")
part2 = Label("Part 2")
part3 = Label("Part 3")
part4 = Label("Part 4")
panel.add(part1)
panel.add(part2)
panel.add(part3)
panel.add(part4)
panel.setCellWidth(part1, "10%")
panel.setCellWidth(part2, "70%")
panel.setCellWidth(part3, "10%")
panel.setCellWidth(part4, "10%")
panel.setCellVerticalAlignment(part3, HasAlignment.ALIGN_BOTTOM)
panel.setWidth("100%")
panel.setHeight("200px")
self.add(panel)