Adding a command to a Pmw.counter widget
mfranklin1 at mfranklin.is-a-geek.org
Thu Sep 30 14:57:14 CEST 2004
Mark Light wrote:
> 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.
More information about the Python-list