wxEVT_UPDATE_UI on wxWidgets 2.9.4 Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
bcteh
Experienced Solver
Experienced Solver
Posts: 72
Joined: Mon Nov 27, 2006 9:56 am

wxEVT_UPDATE_UI on wxWidgets 2.9.4

Post by bcteh » Tue Dec 25, 2012 4:35 pm

Hi

Is wxEVT_UPDATE_UI still supported for wxWidgets 2.9 ?
I use it to control the menu/toolbar enable or disable state.
For wxWidgets 2.8 release, it didn't use much of resources.
But for wxWidgets 2.9, my application use about 50% cpu resources and event worst for OSX, It took around 80++ cpu resources .
After remove wxEVT_UPDATE_UI, the application back to normal.

A bit worry for changing this portion of code [-o<

DavidHart
Site Admin
Site Admin
Posts: 3906
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxEVT_UPDATE_UI on wxWidgets 2.9.4

Post by DavidHart » Tue Dec 25, 2012 8:17 pm

Hi,
Is wxEVT_UPDATE_UI still supported for wxWidgets 2.9 ?
Yes.

It works fine for me. What happens if you run the wx samples that use it e.g. 'widgets'?

Regards,

David

bcteh
Experienced Solver
Experienced Solver
Posts: 72
Joined: Mon Nov 27, 2006 9:56 am

Re: wxEVT_UPDATE_UI on wxWidgets 2.9.4

Post by bcteh » Wed Dec 26, 2012 3:39 am

ha ha. that is my mistake. The toolbar didn't refesh after enabled/disabled.
I addd in a refresh statement. That cause it using a lot resources.

funcToolBar->EnableTool(ID, false);
funcToolBar->Refresh(); --> that is the problem

opps.. I make a mistake for few years .. :oops:
I should using event->Enable() to change the state ..

Post Reply