+void MyFrame::NumericEntry(wxCommandEvent& WXUNUSED(event) )
+{
+ long res = wxGetNumberFromUser( "This is some text, actually a lot of text.\n"
+ "Even two rows of text.",
+ "Enter a number:", "Numeric input test",
+ 50, 0, 100, this );
+
+ wxString msg;
+ int icon;
+ if ( res == -1 )
+ {
+ msg = "Invalid number entered or dialog cancelled.";
+ icon = wxICON_HAND;
+ }
+ else
+ {
+ msg.Printf(_T("You've entered %lu"), res );
+ icon = wxICON_INFORMATION;
+ }
+
+ wxMessageBox(msg, "Numeric test result", wxOK | icon, this);
+}
+