[pygtk] Spinbutton + keyboard editing + focus-out-event
Ruslan
alienoid at is.lg.ua
Thu Sep 30 05:27:40 WST 2004
В Чтв, 30.09.2004, в 00:16, John Finlay пишет:
> Ruslan wrote:
>
> >Hello, everybody.
> >
> >I have table with packed Spinbuttons in it, the problem is that when i
> >connect event handler for 'focus-out-event' to spinbutton and make
> >manual keyboard editing(putting directly numbers) without pressing
> >'Enter' and then leaving focus from spinbutton,
> >widget.get_value_as_int() in my 'focus-out-event' handler gives me
> >previous value stored in spinbutton and not the one i manually created,
> >only giving that spinbutton focus again and then leaving focus makes
> >call to my 'focus-out-event' handler print the value that is visible in
> >spinbutton. Changing value of spinbutton with mouse or keyboard arrows
> >buttons gives correct behaviour in my 'focus-out-event' handler.
> >Could somebody suggest something on the above issue?
> >
> >Your help is very appreciated.
> >
> >
> Try calling the gtk.SpinButton.update() method in your handler to force
> the spinbutton to update before getting the value.
>
Yes, that helped, thank you very much for your help.
> John
>
>
More information about the pygtk
mailing list