wxLB_TOP, wxNB_TOP, wxCHB_TOP, wxTBK_TOP.
- Added parent window parameter to wxHelpController constructor
and added SetParentWindow/GetParentWindow.
+- wxMultiChoiceDialog uses now wxCheckListBox if possible, wxListBox if not.
wxMSW:
long styleLbox = wxLB_ALWAYS_SB);
protected:
- wxListBox *m_listbox;
+ wxListBoxBase *m_listbox;
+
+ virtual wxListBoxBase *CreateList(int n,
+ const wxString *choices,
+ long styleLbox);
DECLARE_NO_COPY_CLASS(wxAnyChoiceDialog)
};
virtual bool TransferDataFromWindow();
protected:
+#if wxUSE_CHECKLISTBOX
+ virtual wxListBoxBase *CreateList(int n,
+ const wxString *choices,
+ long styleLbox);
+#endif // wxUSE_CHECKLISTBOX
+
wxArrayInt m_selections;
private:
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);
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
// ----------------------------------------------------------------------------
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