don't use SetWindowStyleFlag() in wxWindowBase::CreateBase() but assign to m_windowStyle directly; this allows SetWindowStyleFlag() in the derived classes to change the styles of the control without worrying about whether it had been already created
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -251,8 +251,12 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
|
|||||||
// generate a new id if the user doesn't care about it
|
// generate a new id if the user doesn't care about it
|
||||||
m_windowId = id == wxID_ANY ? NewControlId() : id;
|
m_windowId = id == wxID_ANY ? NewControlId() : id;
|
||||||
|
|
||||||
|
// don't use SetWindowStyleFlag() here, this function should only be called
|
||||||
|
// to change the flag after creation as it tries to reflect the changes in
|
||||||
|
// flags by updating the window dynamically and we don't need this here
|
||||||
|
m_windowStyle = style;
|
||||||
|
|
||||||
SetName(name);
|
SetName(name);
|
||||||
SetWindowStyleFlag(style);
|
|
||||||
SetParent(parent);
|
SetParent(parent);
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
|
Reference in New Issue
Block a user