0
votes

I am currently writing a small GUI application in C++ using WxWidgets.

I have a wxStaticText widget which has a value in it.

How can I continuously update that value as my program is running?

I have tried using the Update UI event:

Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MyFrame::Display))

although this updates the value, it is not smooth i.e. the values are "blinking" in between updates, is there any way I can stop this blinking and have a continuous, smooth update?

1
What does the static mean in wxStaticText? - Peter Wood

1 Answers

2
votes

What is your CPU utilization?

It looks like ( as far as I can tell from the tiny fragment of code you posted ) that you are rewriting your entire display many, many times a second. Not good!

It would be better, if you haven't already in the code you are not showing us, to only update the wxStaticText widget label and only when the value has actually changed.