本文整理汇总了Python中efl.elementary.label.Label.line_wrap_set方法的典型用法代码示例。如果您正苦于以下问题:Python Label.line_wrap_set方法的具体用法?Python Label.line_wrap_set怎么用?Python Label.line_wrap_set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.label.Label
的用法示例。
在下文中一共展示了Label.line_wrap_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWin
# 需要导入模块: from efl.elementary.label import Label [as 别名]
# 或者: from efl.elementary.label.Label import line_wrap_set [as 别名]
#.........这里部分代码省略.........
box.pack_end(wheel)
box.pack_end(self.statusLabel)
box.pack_end(detailsbtn)
box.show()
return box
def buildMainBox(self):
# build our toolbar
self.mainTb = Toolbar(self, homogeneous=False,
size_hint_weight=(0.0, 0.0),
size_hint_align=(EVAS_HINT_FILL, 0.0))
self.mainTb.item_append("remove", "Clear", self.clearPressed)
self.mainTb.item_append("system-run", "Select All", self.selectAllPressed)
self.mainTb.item_append("view-refresh", "Refresh", self.refreshPressed)
self.mainTb.item_append("info", "Log", self.detailsPressed)
self.mainTb.item_append("ok", "Apply", self.installUpdatesPressed)
self.mainTb.show()
# build our sortable list that displays packages that need updates
titles = [("Upgrade", True), ("Package", True),
("Installed", True), ("Available", True)]
scr = Scroller(self, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
self.packageList = sl.SortedList(scr, titles=titles, homogeneous=False,
size_hint_weight=EXPAND_HORIZ)
scr.content = self.packageList
scr.show()
# build the label that shows the package's description
self.currentDescription = Label(self,
size_hint_weight=FILL_BOTH)
self.currentDescription.text = "Select a package for information"
self.currentDescription.line_wrap_set(True)
self.currentDescription.show()
self.desFrame = Frame(self, size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
self.desFrame.text = "Description"
self.desFrame.content = self.currentDescription
self.desFrame.show()
# add all of our objects to the box
box = Box(self, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
box.pack_end(self.mainTb)
box.pack_end(scr)
box.pack_end(self.desFrame)
box.show()
return box
def detailsPressed(self, obj, it):
it.selected = False
self.innerWinShow()
def clearPressed(self, obj, it):
it.selected = False
for rw in self.packageList.rows:
rw[0].state = False
self.app.checkChange(rw[0])
def selectAllPressed(self, obj, it):
it.selected = False
for rw in self.packageList.rows:
rw[0].state = True