Replies: 1 comment 3 replies
-
The problem you're hitting is a general limitation of GUI frameworks. GUI frameworks require that you make any GUI modifications on the GUI thread - you can't modify a GUI from the non-GUI thread. In this case, you've set up a second thread so that you don't block the main GUI thread with the sleep calls - which is good - but you then can't make the label updates from the second thread. In most GUI frameworks, the fix for this is to post a message from the non-GUI worker thread to the GUI thread indicating the GUI update that you want to make. However, Toga has a much easier solution - a background task. Redefine
This will queue add You can also use an async worker, by redefining |
Beta Was this translation helpful? Give feedback.
-
How to use sub threads to update the text of a Label / value of MultilineTextInput?
I want to use LABEL to display constantly updated text.
look at my code,
Press Record Button OK, press Connect Button failed!
help! Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions