#ifdefed out a typedef not appropriate to MSW; added SetSelection to choice dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -225,6 +225,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
|
||||
|
||||
wxListBox *listBox = new wxListBox(this, wxID_LISTBOX, wxPoint(-1, -1), wxSize(240, 160),
|
||||
n, choices);
|
||||
listBox->SetSelection(m_selection);
|
||||
if ( clientData )
|
||||
{
|
||||
int i;
|
||||
@@ -287,6 +288,17 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Set the selection
|
||||
void wxSingleChoiceDialog::SetSelection(int sel)
|
||||
{
|
||||
wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX);
|
||||
if (listBox)
|
||||
{
|
||||
listBox->SetSelection(sel);
|
||||
}
|
||||
m_selection = sel;
|
||||
}
|
||||
|
||||
void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX);
|
||||
|
Reference in New Issue
Block a user