fdialog.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Easy 作者: HeaTTheatR 项目源码 文件源码
def __init__(self, **kvargs):
        super(FDialog, self).__init__(**kvargs)

        box = BoxLayout(orientation='vertical', spacing=10)
        fdialog = FileChooserListView(path=self.path)
        fdialog.bind(selection=self.events_callback)
        box.add_widget(fdialog)

        if self.filter == 'folder':
            box.add_widget(SettingSpacer())
            box.add_widget(
                Button(text=self.text_button_ok, size_hint=(1, .1),
                       background_normal=self.background_image_buttons[0],
                       background_down=self.background_image_shadows[0],
                       on_press=self.events_callback)
            )
            fdialog.filters = [self.is_dir]
        elif self.filter == 'files':
            fdialog.filters = [self.is_file]

        self.content = box
        self.open()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号