Implemented Reparent() and added test for it to minifram sample.
Fixed one out of two window resizing bugs in multi-line text ctrl. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2383,12 +2383,23 @@ bool wxWindow::AcceptsFocus() const
|
||||
bool wxWindow::Reparent( wxWindow *newParent )
|
||||
{
|
||||
wxCHECK_MSG( (m_widget != NULL), (wxWindow*) NULL, _T("invalid window") );
|
||||
|
||||
gtk_widget_unparent( m_widget );
|
||||
|
||||
wxWindow *oldParent = m_parent;
|
||||
|
||||
if ( !wxWindowBase::Reparent(newParent) )
|
||||
return FALSE;
|
||||
|
||||
if (oldParent)
|
||||
{
|
||||
gtk_container_remove( GTK_CONTAINER(oldParent->m_wxwindow), m_widget );
|
||||
}
|
||||
|
||||
if (newParent)
|
||||
{
|
||||
/* insert GTK representation */
|
||||
(*(newParent->m_insertCallback))(newParent, this);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user