本文整理汇总了Python中pyjamas.ui.VerticalPanel.VerticalPanel.setSize方法的典型用法代码示例。如果您正苦于以下问题:Python VerticalPanel.setSize方法的具体用法?Python VerticalPanel.setSize怎么用?Python VerticalPanel.setSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.VerticalPanel.VerticalPanel
的用法示例。
在下文中一共展示了VerticalPanel.setSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onModuleLoad
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import setSize [as 别名]
def onModuleLoad(self):
""" Dynamically build our user interface when the web page is loaded.
"""
self._root = RootPanel()
self._tree = Tree()
self._rightPanel = SimplePanel()
self._curContents = None
intro = HTML('<h3>Welcome to the Pyjamas User Interface Showcase</h3>'+
'<p/>Please click on an item to start.')
self._introPanel = VerticalPanel()
self._introPanel.add(uiHelpers.indent(intro, left=20))
self._demos = [] # List of all installed demos. Each item in this list
# is a dictionary with the following entries:
#
# 'name'
#
# The name for this demo.
#
# 'section'
#
# The name of the section of the demo tree
# this demo should be part of.
#
# 'doc'
#
# The documentation for this demo.
#
# 'src'
#
# The source code for this demo.
#
# 'example'
#
# The Panel which holds the example output for
# this demo.
self.loadDemos()
self.buildTree()
self._tree.setSize("0%", "100%")
divider = VerticalPanel()
divider.setSize("1px", "100%")
divider.setBorderWidth(1)
scroller = ScrollPanel(self._rightPanel)
scroller.setSize("100%", "100%")
hPanel = HorizontalPanel()
hPanel.setSpacing(4)
hPanel.add(self._tree)
hPanel.add(divider)
hPanel.add(scroller)
hPanel.setHeight("100%")
self._root.add(hPanel)
self._tree.addTreeListener(self)
self.showDemo(None)