Adding a command to a Pmw.counter widget

M

Mark Light

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.

Many thanks,

Mark.
 
M

Martin Franklin

Mark said:
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.

Martin
 
M

Mark Light

Martin said:
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.

Martin

Thanks - this put me on the right track
 
M

Mark Light

Martin said:
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.

Martin

Thanks - this put me on the right track
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top