wxMultiChoiceDialog uses now wxCheckListBox if possible, wxListBox if not
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -272,10 +272,8 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
||||
topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(10,0) );
|
||||
|
||||
// 2) list box
|
||||
m_listbox = new wxListBox( this, wxID_LISTBOX,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
n, choices,
|
||||
styleLbox );
|
||||
m_listbox = CreateList(n,choices,styleLbox);
|
||||
|
||||
if ( n > 0 )
|
||||
m_listbox->SetSelection(0);
|
||||
|
||||
@@ -326,6 +324,14 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
||||
styleDlg, pos, styleLbox);
|
||||
}
|
||||
|
||||
wxListBoxBase *wxAnyChoiceDialog::CreateList(int n, const wxString *choices, long styleLbox)
|
||||
{
|
||||
return new wxListBox( this, wxID_LISTBOX,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
n, choices,
|
||||
styleLbox );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxSingleChoiceDialog
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -506,4 +512,16 @@ bool wxMultiChoiceDialog::TransferDataFromWindow()
|
||||
return true;
|
||||
}
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
|
||||
wxListBoxBase *wxMultiChoiceDialog::CreateList(int n, const wxString *choices, long styleLbox)
|
||||
{
|
||||
return new wxCheckListBox( this, wxID_LISTBOX,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
n, choices,
|
||||
styleLbox );
|
||||
}
|
||||
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
#endif // wxUSE_CHOICEDLG
|
||||
|
Reference in New Issue
Block a user