示例#1
0
 def packFileFolder(self, ourPath, d, isDir):
     if isDir:
         li = GenlistItem(item_data={"type": "dir", "path": ourPath, "d": d}, item_class=dirglic, func=self.listItemSelected)
     else:
         li = GenlistItem(item_data={"type": "file", "path": ourPath, "d": d}, item_class=fileglic, func=self.listItemSelected)
         
     li.append_to(self.fileList)
示例#2
0
    def __init__(self):
        StandardWindow.__init__(self, "ex11", "Genlist List", size=(300, 200))
        self.callback_delete_request_add(lambda o: elm.exit())

        ourList = Genlist(self)
        ourList.size_hint_weight = EXPAND_BOTH
        ourList.callback_activated_add(self.listItemSelected)

        ListItems.sort()

        for it in ListItems:
            li = GenlistItem(item_data={"itemName": it}, item_class=GLIC())
            li.append_to(ourList)

        ourList.show()

        self.resize_object_add(ourList)
 def __init__(self):
     StandardWindow.__init__(self, "ex11", "Genlist List", size=(300, 200))
     self.callback_delete_request_add(lambda o: elm.exit())
     
     ourList = Genlist(self)
     ourList.size_hint_weight = EXPAND_BOTH
     ourList.callback_activated_add(self.listItemSelected)
     
     ListItems.sort()
     
     for it in ListItems:
         li = GenlistItem(item_data={"itemName":it}, item_class=GLIC())
         li.append_to(ourList)
     
     ourList.show()
     
     self.resize_object_add(ourList)
 def pack_all(self, path, name, is_dir):
     '''Append to genlist'''
     if is_dir:
         gen_lst_it = GenlistItem(item_data={
             'type': 'dir',
             'path': path,
             'd': name
         },
                                  item_class=DIRGLIC,
                                  func=self.list_it_selected)
     else:
         gen_lst_it = GenlistItem(item_data={
             'type': 'file',
             'path': path,
             'd': name
         },
                                  item_class=FILEGLIC,
                                  func=self.list_it_selected)
     gen_lst_it.append_to(self.file_lst)