Refreshing Controls and or the Entire window

We don’t all love to use it.

4 Likes

Thanks Marcus! I appreciate everyone’s response and understanding on this topic.

Thanks Rick and TimStreater, I am trying to learn the correct proper way to do this now based off of your suggestions. To not rely upon the App.DoEvents so much. That method doesn’t seem to work or do anything for me when I call it right now anyway so I am trying to learn the proper way now. Thanks for your honest opinion.

Tim P, your thoughts? I am open to hear and learn from everyone’s opinion on this topic.

Xojo is capable of creating very elegant and clean code, but you have to really wrap your head around event-driven programming. “A bunch of timers!” sounds messy, but timers can be good friends. If you want a ProgressBar monitoring a process, for example, just have a timer that periodically sets its value to that of a property updated by the process. By using OOP, subclassing controls, and instantiating timers in code instead of cluttering windows with them you can encapsulate things nicely.

3 Likes

And put that process in a Thread. And Yield often enough to allow the window to refresh.

Julia and Tim H thanks for your replies. I will try to implement these practices.