Pmw.Counter() - entry field with up and down arrow buttons
This class consists of an entry field with arrow buttons to increment and decrement the value in the entry field. Built-in entry types include numbers, times and dates. An external counting function may also be supplied. The entry field's validation function is also available. The components may be laid out horizontally or vertically.
numeric any integer integer any integer real real number timeN HH:MM:SS (may be negative) time24 HH:MM:SS (wraps around at 23:59:59) date_dmy DD/MM/YY date_mdy MM/DD/YY date_ymd YY/MM/DD date_dmy4 DD/MM/YYYY date_mdy4 MM/DD/YYYY date_y4md YYYY/MM/DD
If validate is a function, then it will be called whenever the counter is incremented or decremented. The function is called with the arguments (text, factor, increment, min, max), where text is the current contents of the entry field, factor is 1 when incrementing or -1 when decrementing, and the other arguments are the values of the options of the same name.
The validate function should return a string representing the incremented or decremented value. It should raise an error if min or max would be exceeded or if the text is invalid. The default is 'numeric'.
If None, a label component is not created. The default is None.
Home. Pmw 0.6.2 Maintainer gregm@iname.com. 23 Feb 1998