当前位置: 首页>>代码示例>>Python>>正文


Python Label.line_wrap_set方法代码示例

本文整理汇总了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
开发者ID:jbenito,项目名称:bodhi3packages,代码行数:70,代码来源:eepDater.py


注:本文中的efl.elementary.label.Label.line_wrap_set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。