Hi,
During our process we create some controls in order to show the achieved
results.
* wxStaticBox* m_sizer3_staticbox = new wxStaticBox(this, -1,
wxT("Results of Quantificaction:"));
m_sizer3 = new wxStaticBoxSizer(m_sizer3_staticbox, wxVERTICAL);
m_grid_sizer2 = new wxFlexGridSizer(2, 2, 0, 0);
m_label3 = new wxStaticText(this, wxID_ANY, wxT("SUR " + nameResult
+ ":\t"),wxDefaultPosition, wxDefaultSize,
wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL);
m_label3->SetFont(wxFont(8, wxDEFAULT, wxNORMAL, wxBOLD));
m_label4 = new wxStaticText(this, wxID_ANY,
wxT(wxString::Format("%.5f", numResult )),wxDefaultPosition, wxDefaultSize,
wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL);
m_label5 = new wxStaticText(this, wxID_ANY, wxT("Standard SUR
:\t"),wxDefaultPosition, wxDefaultSize,
wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL);
m_label5->SetFont(wxFont(8, wxDEFAULT, wxNORMAL, wxBOLD));
m_label6 = new wxStaticText(this, wxID_ANY,
wxT(wxString::Format("%.5f", StandardResult )),wxDefaultPosition,
wxDefaultSize, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL);
m_grid_sizer2->Add(m_label3, 0,wxEXPAND|wxALL,5);
m_grid_sizer2->Add(m_label4, 0,wxEXPAND|wxALL,5);
m_grid_sizer2->Add(m_label5, 0,wxEXPAND|wxALL,5);
m_grid_sizer2->Add(m_label6, 0,wxEXPAND|wxALL,5);
m_sizer3->Add(m_grid_sizer2, 0, wxALL|wxEXPAND, 5);
m_sizer2->Add(m_sizer3, 0, wxALL|wxEXPAND, 5);
// Resize this
// Cast a resize event
wxSizeEvent resEvent(this->GetBestSize(), this->GetId());
resEvent.SetEventObject(this);
this->GetEventHandler()->ProcessEvent(resEvent);
this->Refresh();*
At some point we need to destroy this controls. We have this code in order
to achieve this
* //Remove static texts
m_grid_sizer2->Detach(m_label3);
m_grid_sizer2->Detach(m_label4);
m_label3->Destroy();
m_label4->Destroy();
//Remove grid sizer
m_sizer3->Detach(m_grid_sizer2);
m_sizer3->Remove(m_grid_sizer2);
//Remove sizer 3
m_sizer3->Show(false);
m_sizer2->Detach(m_sizer3);
m_sizer2->Remove(m_sizer3);
GetSizer()->Layout();
GetSizer()->Fit(this);
// Resize this
// Cast a resize event
wxSizeEvent resEvent(this->GetBestSize(), this->GetId());
resEvent.SetEventObject(this);
this->GetEventHandler()->ProcessEvent(resEvent);*
Although the creation works correctly, when we later try to destroy those
controls, they are not destroyed and other parts of the panel widget are
eliminated and all the panel widget of the processor stops working
correctly.
What is being done uncorrectly?
Thank you very much,
Aida
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers