本文整理汇总了Python中ui.VerticalPanel.setStyleName方法的典型用法代码示例。如果您正苦于以下问题:Python VerticalPanel.setStyleName方法的具体用法?Python VerticalPanel.setStyleName怎么用?Python VerticalPanel.setStyleName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ui.VerticalPanel
的用法示例。
在下文中一共展示了VerticalPanel.setStyleName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from ui import VerticalPanel [as 别名]
# 或者: from ui.VerticalPanel import setStyleName [as 别名]
def __init__(self):
Composite.__init__(self)
self.signOutLink = HTML("<a href='javascript:;'>Sign Out</a>")
self.aboutLink = HTML("<a href='javascript:;'>About</a>")
outer = HorizontalPanel()
inner = VerticalPanel()
outer.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT)
inner.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT)
links = HorizontalPanel()
links.setSpacing(4)
links.add(self.signOutLink)
links.add(self.aboutLink)
outer.add(inner)
inner.add(HTML("<b>Welcome back, [email protected]</b>"))
inner.add(links)
self.signOutLink.addClickListener(self)
self.aboutLink.addClickListener(self)
self.initWidget(outer)
inner.setStyleName("mail-TopPanel")
links.setStyleName("mail-TopPanelLinks")
示例2: __init__
# 需要导入模块: from ui import VerticalPanel [as 别名]
# 或者: from ui.VerticalPanel import setStyleName [as 别名]
def __init__(self):
Composite.__init__(self)
panel = VerticalPanel()
headerPanel = VerticalPanel()
self.subject = HTML()
self.sender = HTML()
self.recipient = HTML()
self.body = HTML()
self.scroller = ScrollPanel(self.body)
self.body.setWordWrap(True)
headerPanel.add(self.subject)
headerPanel.add(self.sender)
headerPanel.add(self.recipient)
headerPanel.setWidth("100%")
innerPanel = DockPanel()
innerPanel.add(headerPanel, DockPanel.NORTH)
innerPanel.add(self.scroller, DockPanel.CENTER)
innerPanel.setCellHeight(self.scroller, "100%")
panel.add(innerPanel)
innerPanel.setSize("100%", "100%")
self.scroller.setSize("100%", "100%")
self.initWidget(panel)
self.setStyleName("mail-Detail")
headerPanel.setStyleName("mail-DetailHeader")
innerPanel.setStyleName("mail-DetailInner")
self.subject.setStyleName("mail-DetailSubject")
self.sender.setStyleName("mail-DetailSender")
self.recipient.setStyleName("mail-DetailRecipient")
self.body.setStyleName("mail-DetailBody")