本文整理汇总了Python中pyjamas.ui.VerticalPanel.VerticalPanel.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Python VerticalPanel.setHeight方法的具体用法?Python VerticalPanel.setHeight怎么用?Python VerticalPanel.setHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.VerticalPanel.VerticalPanel
的用法示例。
在下文中一共展示了VerticalPanel.setHeight方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import setHeight [as 别名]
def __init__(self):
SimplePanel.__init__(self)
panel = VerticalPanel()
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.setCellHeight(part1, "10%")
panel.setCellHeight(part2, "70%")
panel.setCellHeight(part3, "10%")
panel.setCellHeight(part4, "10%")
panel.setCellHorizontalAlignment(part3, HasAlignment.ALIGN_RIGHT)
panel.setWidth("50%")
panel.setHeight("300px")
self.add(panel)
示例2: loadChapters
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import setHeight [as 别名]
def loadChapters(self):
self.curInfo = ''
self.curSink = None
self.description = HTML()
self.sink_list = SinkList()
self.panel = DockPanel()
self.loadSinks()
self.sinkContainer = DockPanel()
self.sinkContainer.setStyleName("ks-Sink")
#self.nf = NamedFrame("section")
#self.nf.setWidth("100%")
#self.nf.setHeight("10000")
height = Window.getClientHeight()
self.sp = ScrollPanel(self.sinkContainer)
#self.sp = VerticalSplitPanel()
self.sp.setWidth("100%")
self.sp.setHeight("%dpx" % (height-110))
#self.sp.setTopWidget(self.sinkContainer)
#self.sp.setBottomWidget(self.nf)
#self.sp.setSplitPosition(10000) # deliberately high - max out.
vp = VerticalPanel()
vp.setWidth("100%")
vp.setHeight("100%")
vp.add(self.description)
vp.add(self.sp)
self.description.setStyleName("ks-Intro")
self.panel.add(self.sink_list, DockPanel.WEST)
self.panel.add(vp, DockPanel.CENTER)
self.panel.setCellVerticalAlignment(self.sink_list,
HasAlignment.ALIGN_TOP)
self.panel.setCellWidth(vp, "100%")
self.panel.setCellHeight(vp, "100%")
Window.addWindowResizeListener(self)
History.addHistoryListener(self)
RootPanel().add(self.panel)
示例3: onModuleLoad
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import setHeight [as 别名]
def onModuleLoad(self):
self.curInfo=''
self.curSink=None
self.description=HTML()
self.sink_list=SinkList()
self.panel=DockPanel()
self.b=Button("load", self)
self.sinkContainer = DockPanel()
self.sinkContainer.setStyleName("ks-Sink")
height = Window.getClientHeight()
self.sp = ScrollPanel(self.sinkContainer)
self.sp.setWidth("100%")
self.sp.setHeight("%dpx" % (height-110))
vp=VerticalPanel()
vp.setWidth("100%")
vp.setHeight("100%")
vp.add(self.description)
vp.add(self.sp)
self.description.setStyleName("ks-Intro")
self.panel.add(self.sink_list, DockPanel.WEST)
self.panel.add(vp, DockPanel.CENTER)
self.panel.setCellVerticalAlignment(self.sink_list, HasAlignment.ALIGN_TOP)
self.panel.setCellWidth(vp, "100%")
self.panel.setCellHeight(vp, "100%")
Window.addWindowResizeListener(self)
History.addHistoryListener(self)
RootPanel().add(self.panel)
#RootPanel().add(self.b)
self.loadSinks()
示例4: loadChapters
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import setHeight [as 别名]
def loadChapters(self):
self.curInfo = ''
self.curSink = None
self.description = HTML()
self.sink_list = SinkList()
self.panel = DockPanel()
self.loadSinks()
self.sinkContainer = DockPanel()
self.sinkContainer.setStyleName("ks-Sink")
#self.nf = NamedFrame("section")
#self.nf.setWidth("100%")
#self.nf.setHeight("10000")
self.sp = ScrollPanel(self.sinkContainer)
#self.sp = VerticalSplitPanel()
self.sp.setWidth("100%")
self.sp.setHeight("100%")
#self.sp.setTopWidget(self.sinkContainer)
#self.sp.setBottomWidget(self.nf)
#self.sp.setSplitPosition(10000) # deliberately high - max out.
vp = VerticalPanel()
vp.setWidth("99%")
vp.setHeight("100%")
vp.add(self.description)
vp.add(self.sp)
authors = [
("2008, 2009", "Kenneth Casson Leighton", "[email protected]")
]
for years, name, email in authors:
authors_html = \
'© %s <a href="mailto:%s">%s</a><br />' %\
(years, email, name)
authors_panel = HTML()
authors_panel.setStyleName("ks-Authors")
authors_panel.setHTML(authors_html[:-6])
left_panel = DockPanel(Height="100%")
left_panel.add(self.sink_list, DockPanel.NORTH)
left_panel.add(authors_panel, DockPanel.SOUTH)
self.description.setStyleName("ks-Intro")
self.panel.add(left_panel, DockPanel.WEST)
self.panel.add(vp, DockPanel.CENTER)
self.panel.setCellVerticalAlignment(self.sink_list,
HasAlignment.ALIGN_TOP)
self.panel.setCellWidth(vp, "100%")
self.panel.setCellHeight(vp, "100%")
Window.addWindowResizeListener(self)
History.addHistoryListener(self)
RootPanel().add(self.panel)
self.onWindowResized(Window.getClientWidth(), Window.getClientHeight())
示例5: Button
# 需要导入模块: from pyjamas.ui.VerticalPanel import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel.VerticalPanel import setHeight [as 别名]
resdict = resgen_core.processconf(inputArea.getText())
hData = resgen_core.processhorz(resdict, hTemplate, footdict)
outputArea.setText(hData)
if __name__ == '__main__':
b = Button("Convert", convert)
p = HorizontalPanel()
p.add(inputArea)
p.add(outputArea)
q = VerticalPanel()
q.setStyleName("panel")
q.add(b)
q.add(p)
q.setHeight("100%")
q.setWidth("100%")
p.setHeight("80%")
p.setWidth("100%")
inputArea.setHeight("100%")
inputArea.setWidth("100%")
outputArea.setHeight("100%")
outputArea.setWidth("100%")
inputArea.setText(confDefault)
RootPanel().add(q)