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()
评论列表
文章目录