// wxSingleChoiceDialog
-#if !USE_SHARED_LIBRARY
BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog)
EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick)
END_EVENT_TABLE()
IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog)
-#endif
#if defined(__WXMSW__) || defined(__WXMAC__)
#define wxCHOICEDLG_DIALOG_STYLE (wxDEFAULT_DIALOG_STYLE | \
const wxPoint& WXUNUSED(pos) )
{
m_selection = 0;
- m_clientData = NULL;
- m_stringSelection = wxT("");
m_dialogStyle = style;
wxBeginBusyCursor();
-
+
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
// 1) text message
topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );
-
+
// 2) list box
- m_listbox = new wxListBox( this, wxID_LISTBOX, wxDefaultPosition, wxSize(160,100) ,
+ m_listbox = new wxListBox( this, wxID_LISTBOX, wxDefaultPosition, wxSize(160,100) ,
n, choices, wxLB_ALWAYS_SB );
m_listbox->SetSelection( m_selection );
if (clientData)
SetAutoLayout( TRUE );
SetSizer( topsizer );
-
+
topsizer->SetSizeHints( this );
topsizer->Fit( this );
{
m_selection = m_listbox->GetSelection();
m_stringSelection = m_listbox->GetStringSelection();
- m_clientData = m_listbox->GetClientData(m_selection);
-
+ // TODO!
+#ifndef __WXMOTIF__
+ if ( m_listbox->HasClientUntypedData() )
+ SetClientData(m_listbox->GetClientData(m_selection));
+#endif
EndModal(wxID_OK);
}
{
m_selection = m_listbox->GetSelection();
m_stringSelection = m_listbox->GetStringSelection();
- m_clientData = m_listbox->GetClientData(m_selection);
+
+ // TODO!
+#ifndef __WXMOTIF__
+ if ( m_listbox->HasClientUntypedData() )
+ SetClientData(m_listbox->GetClientData(m_selection));
+#endif
EndModal(wxID_OK);
}