wxUpdateUIEvent question Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
newbee
In need of some credit
In need of some credit
Posts: 8
Joined: Sat Nov 19, 2011 8:54 pm

wxUpdateUIEvent question

Post by newbee »

Hi ,
my question is related to the the book example personelrecorddialog.How can we say

Code: Select all

if (ageCtrl->GetValue() < 18)
{
event.Enable(false);
event.Check(false);
}
else
event.Enable(true);
to update the checkbox control(shouldnt we use control itself?)?
User avatar
doublemax
Moderator
Moderator
Posts: 19159
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxUpdateUIEvent question

Post by doublemax »

to update the checkbox control(shouldnt we use control itself?)?
wxUpdateUIEvents are defined to work this way. From the docs:
Instead of directly manipulating the menu or button, you call functions in the event object, such as wxUpdateUIEvent::Check. wxWidgets will determine whether such a call has been made, and which UI element to update.
http://docs.wxwidgets.org/stable/wx_wxu ... ateuievent
Use the source, Luke!
Post Reply