本文整理汇总了Python中pyjamas.ui.HTML.HTML.addStyleName方法的典型用法代码示例。如果您正苦于以下问题:Python HTML.addStyleName方法的具体用法?Python HTML.addStyleName怎么用?Python HTML.addStyleName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.HTML.HTML
的用法示例。
在下文中一共展示了HTML.addStyleName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addRow
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import addStyleName [as 别名]
def addRow(self,Entry,r, row):
#Window.alert(r['thumbimg'])
title = HTML("<span title=\""+r['title']+"\"; style=\"color:black;\">"+r['title']+"</span>")
title.setStyleName("pointer")
author = HTML("<span title=\""+r['author']+"\" style=\"color:grey\">"+"Author(s): "+r['author']+"</span>")
#asin = r['asin']
img = r['thumbnail']
nsellers = HTML("<span style=\"color:green\">"+"Sellers: "+str(r['numsellers'])+"</span>")
isbn = HTML("<span style=\"color:#483D8B\">"+"ISBN: "+str(r['isbn'])+"</span>")
onSell = r['onSell']
onWish = r['onWish']
if(img == "N/A"):
img = "#"
imghtml = HTML("<img src='"+img+"' alt='No Thumbnail'/>")
imghtml.setStyleName("pointer")
title.setWidth(str(self.table_width)+"px")
author.setWidth(str(self.table_width)+"px")
info_wrapper = VerticalPanel()
info_wrapper.add(title)
info_wrapper.add(isbn)
info_wrapper.add(author)
info_wrapper.add(nsellers)
Entry.setWidget(row,0,imghtml)
Entry.setWidget(row, 1, info_wrapper)
Entry.getRowFormatter().addStyleName(row,"comments")
#Entry.setWidget(row,1,title)
#Entry.setText(row,2,nsellers)
def _get_book_data_Click(event):
self.remote.search_check(self,r)
title.addClickListener(_get_book_data_Click)
title.addStyleName("pointer")
imghtml.addClickListener(_get_book_data_Click)
imghtml.addStyleName("pointer")
'''
示例2: newPositioner
# 需要导入模块: from pyjamas.ui.HTML import HTML [as 别名]
# 或者: from pyjamas.ui.HTML.HTML import addStyleName [as 别名]
def newPositioner(self, context):
positioner = HTML("※")
positioner.addStyleName(CSS_DRAGDROP_FLOW_PANEL_POSITIONER)
return positioner