Setup:
> Windows 7 and 8.1 x64
> Visual Studio 2013 (v12)
> wxWidgets 3.1 (x86)
> Link Type: static
Scenario/Problem:
I have a wxButton (myButton) on a wxFrame as a parent.
myButton has been set to disabled.
I do the following to enable the button after some processing:
Code: Select all
myButton.Enable(true);
myButton.SetBitmap(someBitmap);
myButton.SetBitmapDisabled(wxBitmap());
// force image update...
myButton.Refresh();
myButton.Update();
Code: Select all
if (!myButton.IsEnabled()){/*do something*/}
Why would the wxFrame (parent of myButton) have been set to disabled at all? Is this a result of the calls I made above for bitmap changes and refresh/update? Or is there something else that happens normally with wxFrames internally that causes them to go disabled? I don't have any calls in my code to disable the wxFrame directly.
Current Solution:
As suggested in the docs, I'm using IsThisEnabled() instead of IsEnabled().
My goal with this post is just to understand why the wxFrame is showing as disabled.