Classes | |
class | wxNumberEntryDialog |
This class represents a dialog that requests a numeric input from the user. More... | |
Functions | |
long | wxGetNumberFromUser (const wxString &message, const wxString &prompt, const wxString &caption, long value, long min=0, long max=100, wxWindow *parent=NULL, const wxPoint &pos=wxDefaultPosition) |
Shows a dialog asking the user for numeric input. | |
long wxGetNumberFromUser | ( | const wxString & | message, |
const wxString & | prompt, | ||
const wxString & | caption, | ||
long | value, | ||
long | min = 0 , |
||
long | max = 100 , |
||
wxWindow * | parent = NULL , |
||
const wxPoint & | pos = wxDefaultPosition |
||
) |
Shows a dialog asking the user for numeric input.
The dialogs title is set to caption
, it contains a (possibly) multiline message
above the single line prompt
and the zone for entering the number.
The number entered must be in the range min
to max
(both of which should be positive) and value
is the initial value of it. If the user enters an invalid value, it is forced to fall into the specified range. If the user cancels the dialog, the function returns -1. If it is important to distinguish between cancelling the dialog and actually entering -1 in it, i.e. if -1 is a valid input value, this convenience function can't be used and wxNumberEntryDialog should be used directly instead.
Dialog is centered on its parent
unless an explicit position is given in pos
.
Include file:
#include <wx/numdlg.h>