implement wxRadioBox::Reparent(): it didn't reparent the radio buttons (patch 1891030)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
928f37c688
commit
345264343a
@ -111,6 +111,8 @@ public:
|
|||||||
}
|
}
|
||||||
#endif // wxUSE_HELP
|
#endif // wxUSE_HELP
|
||||||
|
|
||||||
|
virtual bool Reparent(wxWindowBase *newParent);
|
||||||
|
|
||||||
// we inherit a version always returning false from wxStaticBox, override
|
// we inherit a version always returning false from wxStaticBox, override
|
||||||
// it to behave normally
|
// it to behave normally
|
||||||
virtual bool AcceptsFocus() const { return wxControl::AcceptsFocus(); }
|
virtual bool AcceptsFocus() const { return wxControl::AcceptsFocus(); }
|
||||||
|
@ -461,6 +461,25 @@ void wxRadioBox::DoSetItemToolTip(unsigned int item, wxToolTip *tooltip)
|
|||||||
|
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
|
bool wxRadioBox::Reparent(wxWindowBase *newParent)
|
||||||
|
{
|
||||||
|
if ( !wxStaticBox::Reparent(newParent) )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
HWND hwndParent = GetHwndOf(GetParent());
|
||||||
|
for ( size_t item = 0; item < m_radioButtons->GetCount(); item++ )
|
||||||
|
{
|
||||||
|
::SetParent((*m_radioButtons)[item], hwndParent);
|
||||||
|
}
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
// put static box under the buttons in the Z-order
|
||||||
|
SetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
|
||||||
|
#endif
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(wxRadioBox, wxStaticBox, m_radioButtons)
|
WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(wxRadioBox, wxStaticBox, m_radioButtons)
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user