wxAUI replacing floating pane problem

Lothar Behrens lothar.behrens at lollisoft.de
Sat Feb 16 03:33:00 PST 2008


Hi,

I have a wxPropertyGrid in a wxAUI pane and it seemed to work when the
pane is not floating.

If I have the pane floating and like to replace it by another property
pane (updating the data),
the floating pane is not correctly closed.

Here you can see the result: http://lothar.dnsalias.net/wordpress/?attachment_id=54

I'm using wxMac 2.6.2 on 10.3.9 (PPC), wxAUI 0.9.1 and wxPropertyGrid
1.2.2
(I have reasons to still use this old versions)

Any ideas ?

Thanks, Lothar

The following code creates the pane:

wxPropertyGrid* pg = CreatePropertyGrid(this);

pg->SetAutoLayout(TRUE);

m_mgr.AddPane(pg, wxPaneInfo().
	Name(wxT("Properties")).Caption(wxT("Properties")).
	//Float().FloatingPosition(GetStartPosition()).
	Left().
	FloatingSize(wxSize(300,200)));

m_mgr.Update();

And this code replaces the old pane:

wxPropertyGrid* oldpg = (wxPropertyGrid*)
m_mgr.GetPane("Properties").window;

if (oldpg != NULL) {
	_LOG << "Replace old property page..." LOG_
	m_mgr.DetachPane(oldpg);

	wxPropertyGrid* newpg = CreatePropertyGrid(oldpg->GetParent());

	oldpg->Close();
	oldpg->Destroy();
	oldpg = NULL;

	m_mgr.AddPane(newpg, wxPaneInfo().
		Name(wxT("Properties")).Caption(wxT("Properties")).
		//Float().FloatingPosition(GetStartPosition()).
		Left().
		FloatingSize(wxSize(300,200)));
	m_mgr.Update();
	return ERR_NONE;
}






More information about the wx-users mailing list