wxBeginBusyCursor();
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
-
+#if wxUSE_STATTEXT
// 1) text message
topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );
+#endif
// 2) prompt and text ctrl
wxBoxSizer *inputsizer = new wxBoxSizer( wxHORIZONTAL );
+
+#if wxUSE_STATTEXT
// prompt if any
if (!prompt.IsEmpty())
inputsizer->Add( new wxStaticText( this, wxID_ANY, prompt ), 0, wxCENTER | wxLEFT, 10 );
+#endif
+
// spin ctrl
wxString valStr;
valStr.Printf(wxT("%ld"), m_value);
#endif
// 4) buttons
- topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxCENTRE | wxALL, 10 );
+ topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxEXPAND | wxALL, 10 );
#endif // !__SMARTPHONE__
if ( m_value < m_min || m_value > m_max )
{
// not a number or out of range
+ m_value = -1;
EndModal(wxID_CANCEL);
}
wxNumberEntryDialog dialog(parent, msg, prompt, title,
value, min, max, pos);
if (dialog.ShowModal() == wxID_OK)
- return dialog.GetValue();
+ return dialog.GetValue();
return -1;
}