Refresh during function (1 Viewer)

celesta

Portal Member
February 7, 2011
46
2
Hello.

I want to modifiy a GUILabelControl during a long loop in a function (to write "Loading in progress..."), but until the function is finished, the skin/screen doesn't refresh. Is it possible to add after the GUILabelControl a function do a refresh ?

Thanks in advance.
 

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    you need to use multiple threads. The thing actually doing the work will need to run in the background and provide callbacks to the main thread to report on its progress
     

    celesta

    Portal Member
    February 7, 2011
    46
    2
    It works ! thank you.

    Using another thread to change the GUILabelControl desn't work but using another thread to do the loop work.

    For information, i used this component to do the "another thread":
    System.ComponentModel.BackgroundWorker
     

    Users who are viewing this thread

    Top Bottom