Don't disable wxStaticBox children at wx level when disabling it
Calling Enable() on all children from wxStaticBox::Enable() was wrong, the actual status of the child, returned by wxWindow::IsThisEnabled(), is not supposed to change just because its parent was disabled. Call NotifyWindowOnEnableChange() to avoid this, while still disabling the children visually.
This commit is contained in:
@@ -1580,6 +1580,11 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
// Recursively call our own and our children DoEnable() when the
|
||||
// enabled/disabled status changed because a parent window had been
|
||||
// enabled/disabled. This is only used by the library implementation.
|
||||
void NotifyWindowOnEnableChange(bool enabled);
|
||||
|
||||
|
||||
protected:
|
||||
// helper for the derived class Create() methods: the first overload, with
|
||||
@@ -1891,11 +1896,6 @@ protected:
|
||||
static void NotifyCaptureLost();
|
||||
|
||||
private:
|
||||
// recursively call our own and our children DoEnable() when the
|
||||
// enabled/disabled status changed because a parent window had been
|
||||
// enabled/disabled
|
||||
void NotifyWindowOnEnableChange(bool enabled);
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// temporary event handlers used by GetPopupMenuSelectionFromUser()
|
||||
void InternalOnPopupMenu(wxCommandEvent& event);
|
||||
|
Reference in New Issue
Block a user