I recently solved the problem you described: display doesn't update until the process finishes
Here is a complete example of how I worked with @andy_s on the #Kivy IRC channel:
My main.py:
from kivy.app import App from kivy.uix.popup import Popup from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.clock import Clock import time, threading class PopupBox(Popup): pop_up_text = ObjectProperty() def update_pop_up_text(self, p_message): self.pop_up_text.text = p_message class ExampleApp(App): def show_popup(self): self.pop_up = Factory.PopupBox() self.pop_up.update_pop_up_text('Running some task...') self.pop_up.open() def process_button_click(self):
My .kv example:
AnchorLayout: anchor_x: 'center' anchor_y: 'center' Button: height: 40 width: 100 size_hint: (None, None) text: 'Click Me' on_press: app.process_button_click() <PopupBox>: pop_up_text: _pop_up_text size_hint: .5, .5 auto_dismiss: True title: 'Status' BoxLayout: orientation: "vertical" Label: id: _pop_up_text text: ''
If you run this example, you can click the Click Me button, which should open the “progress bar” as a modal / pop-up window. This popup will remain open for 5 seconds without blocking the main window. After 5 seconds, the popup will be automatically rejected.
source share