I'm trying to change a GUI element before preforming a lengthy function (little icon to show its busy), but I'm not too sure how to do it.
If I make the change then start the task, GUI doesn't update until the function is finished.
I can make the GUI changes then start the task in a new thread, but I want to lock all user input too, and disabling every component seems a bit tedious.
So far, the most promising solution seems to be:
1) change GUI
2) set flag indicating long task is running (user input functions check this flag before doing anything)
3) start thread with task
4) when done, change GUI back, reset flag
I'd like to know if there's a better way before continuing.