Here are a few suggestions that might address the performance issue you are seeing.
The plyer filechooser uses the same api as the kivy filechooser: https://kivy.org/doc/stable/api-kivy.uix.filechooser.html?highlight=filechooser#module-kivy.uix.filechooser
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
from plyer import filechooser
class TestApp
(App):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.label = None # the label widget
def build(self):
layout = BoxLayout(orientation='vertical')
button = Button(text='Push to Select File')
self.label = Label(text='No File')
layout.add_widget(button)
layout.add_widget(self.label)
def on_button(*args):
filechooser.open_file(title='Open File', path='.', filters=['*.py'],
on_selection=self.handle_selection)
button.bind(on_release=on_button)
return layout
def handle_selection(self, selection):
print(selection)
self.label.text = selection[0] if selection else 'No File'
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/fd98bee3-c07d-401c-84d8-03d07126756cn%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/ioV_4WpAYE8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/6361a572.170a0220.50ac6.96f1SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
That is strange. I wonder if there is an install issue on your machine or something strange in your environment. The open file dialog opens as soon as I release the mouse button. I did not experience any delay.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAOYe3sOuPczrYNfxrrA7fzB%3Dykz%2B57Y2U5JsUk-xLia5v_86Mg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/63628fe5.170a0220.9c3d0.ff28SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
FWIW. I’m running Windows 11. The machines I have tested on are using SSDs.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAOYe3sPVvbbi%3D5vm%3D9vvXu2t0tkmAqYJwJCM%3DE43C3_CZPS%3D%2BA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/636291c5.9d0a0220.2d068.f727SMTPIN_ADDED_MISSING%40gmr-mx.google.com.