Applied patch [ 1219269 ] [wxAll] Fix create button in listbox sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -521,6 +521,7 @@ void LboxTestFrame::Reset()
|
|||||||
|
|
||||||
void LboxTestFrame::CreateLbox()
|
void LboxTestFrame::CreateLbox()
|
||||||
{
|
{
|
||||||
|
wxWindow *parent = m_lbox->GetParent();
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
switch ( m_radioSelMode->GetSelection() )
|
switch ( m_radioSelMode->GetSelection() )
|
||||||
{
|
{
|
||||||
@@ -540,19 +541,16 @@ void LboxTestFrame::CreateLbox()
|
|||||||
flags |= wxLB_SORT;
|
flags |= wxLB_SORT;
|
||||||
|
|
||||||
wxArrayString items;
|
wxArrayString items;
|
||||||
if ( m_lbox )
|
int count = m_lbox->GetCount();
|
||||||
|
for ( int n = 0; n < count; n++ )
|
||||||
{
|
{
|
||||||
int count = m_lbox->GetCount();
|
items.Add(m_lbox->GetString(n));
|
||||||
for ( int n = 0; n < count; n++ )
|
|
||||||
{
|
|
||||||
items.Add(m_lbox->GetString(n));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_sizerLbox->Detach(m_lbox);
|
|
||||||
delete m_lbox;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lbox = new wxListBox(this, wxID_ANY,
|
m_sizerLbox->Detach(m_lbox);
|
||||||
|
delete m_lbox;
|
||||||
|
|
||||||
|
m_lbox = new wxListBox(parent, LboxTest_Listbox,
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
0, NULL,
|
0, NULL,
|
||||||
flags);
|
flags);
|
||||||
|
Reference in New Issue
Block a user