#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:
@@ -207,17 +207,19 @@ void MyFrame::TextEntry(wxCommandEvent& event)
|
||||
|
||||
void MyFrame::SingleChoice(wxCommandEvent& event)
|
||||
{
|
||||
const wxString choices[] = { "One", "Two", "Three", "Four", "Five" } ;
|
||||
int n = 5;
|
||||
const wxString choices[] = { "One", "Two", "Three", "Four", "Five" } ;
|
||||
int n = 5;
|
||||
|
||||
wxSingleChoiceDialog dialog(this, "This is a small sample\nA single-choice convenience dialog",
|
||||
"Please select a value", n, (const wxString *)choices);
|
||||
wxSingleChoiceDialog dialog(this, "This is a small sample\nA single-choice convenience dialog",
|
||||
"Please select a value", n, (const wxString *)choices);
|
||||
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
wxMessageDialog dialog2(this, dialog.GetStringSelection(), "Got string");
|
||||
dialog2.ShowModal();
|
||||
}
|
||||
dialog.SetSelection(2);
|
||||
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
wxMessageDialog dialog2(this, dialog.GetStringSelection(), "Got string");
|
||||
dialog2.ShowModal();
|
||||
}
|
||||
}
|
||||
|
||||
void MyFrame::FileOpen(wxCommandEvent& event)
|
||||
|
Reference in New Issue
Block a user