Keep disabled status when wxBitmapComboBox is recreated in wxMSW
If a disabled wxBitmapComboBox had to be recreated, it lost its disabled status and became unexpectedly enabled. Fix this by explicitly disabling it back in RecreateControl() if necessary. Closes https://github.com/wxWidgets/wxWidgets/pull/376
This commit is contained in:
committed by
Vadim Zeitlin
parent
2a371515df
commit
59d26b0bad
@@ -212,6 +212,10 @@ void wxBitmapComboBox::RecreateControl()
|
||||
// Revert the old string value
|
||||
if ( !HasFlag(wxCB_READONLY) )
|
||||
ChangeValue(value);
|
||||
|
||||
// If disabled we'll have to disable it again after re-creating
|
||||
if ( !IsEnabled() )
|
||||
DoEnable(false);
|
||||
}
|
||||
|
||||
wxBitmapComboBox::~wxBitmapComboBox()
|
||||
|
Reference in New Issue
Block a user