On 14/11/2007 20:56, Tony Cappellini wrote:
> I'm trying to understand why the event handlers for a Spinbox are not
> being called.
>
> I've looked in the components directory and for some strange reason,
> SpinUp and SpinDown are commented out in spinner.py
>
> I didn't see any examples in the Demo projects that actually show the
> event handlers for a Spinbox.
>
> If someone has a few lines of code they could post which shows the
> names of the event handlers used
> when the up/down arrows are clicked it would be helpful.
>
> I've also gave the "Command' field in the Layout editor the name of an
> event handler, but it too isn't being called.
The message watcher only shows the following events being triggered:
mouseDown
textUpdate
mouseUp
mouseMove
so you could use:
def on_Spinner_textUpdate(self, event):
print "Spinning..."
but unless you are keeping track of the spinner's value before and after
the textUpdate it does not look like you can tell whether you
are...er...spinning up or down.
Regards
--
XXXXXXXXXXX
|