]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/choicdgg.cpp
Another one bites the dust.
[wxWidgets.git] / src / generic / choicdgg.cpp
index c045765534901dbf2369ef352c8c2cccd0de3a73..46f8fdc3b90f094c324a029bc205c9ae13ed57a4 100644 (file)
@@ -203,7 +203,7 @@ IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog)
 
 wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
         int n, const wxString *choices, char **clientData, long style, const wxPoint& pos):
-         wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+         wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL)
 {
         Create(parent, message, caption, n, choices, clientData, style);
 }
@@ -284,6 +284,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
        // Insert a sizer for the buttons
        wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
        buttonSizer->SetName("buttonSizer");
+       buttonSizer->SetSpacing(12,0);
 
        // Specify constraints for the button sizer
        wxLayoutConstraints *c = new wxLayoutConstraints;
@@ -297,12 +298,12 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
        wxButton *cancel = NULL;
 
   if (style & wxOK) {
-    ok = new wxButton(this, wxID_OK, _("OK"));
+    ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1) );
        buttonSizer->AddSizerChild(ok);
   }
 
   if (style & wxCANCEL) {
-    cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
+    cancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1));
        buttonSizer->AddSizerChild(cancel);
   }
 
@@ -338,7 +339,7 @@ void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event))
        {
                m_selection = listBox->GetSelection();
                m_stringSelection = listBox->GetStringSelection();
-               m_clientData = listBox->GetClientData(m_selection);
+               m_clientData = (char*)listBox->GetClientData(m_selection);
        }
 
        EndModal(wxID_OK);
@@ -351,7 +352,7 @@ void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event))
        {
                m_selection = listBox->GetSelection();
                m_stringSelection = listBox->GetStringSelection();
-               m_clientData = listBox->GetClientData(m_selection);
+               m_clientData = (char*)listBox->GetClientData(m_selection);
        }
 
        EndModal(wxID_OK);