Adding a command to a Pmw.counter widget
light at soton.ac.uk
Fri Oct 1 11:04:21 CEST 2004
Martin Franklin wrote:
> Mark Light wrote:
> > Hi,
> > I have a Pmw.Counter widget and I would like to add a command
> > that is called on pressing either the up or down arrows (the
> > command will be the same for both). I have managed to do this for
> > the entryfield with "entryfield_command = ", but can't get the same
> > to work for the arrows, could someone help me out with how to do
> > this.
> Looking at the source for the PmwCounter it doesn't look like it
> exposes the buttons callbacks.
> I think the best way to do this would be to provide a validator
> method to the Counter's entryfield. The validator gets called
> whenever the entryfields value changes.
> Example validator methods are included in the Pmw documentation.
Thanks - this put me on the right track
More information about the Python-list