On Fri, 18 Jun 2010, Tadej Borovšak wrote:

> > Below is a minimal test program. I'd expect that, since the spin
> > button's range is set as 1 to 4, I ought to be able to display
> > "B", "C"  and "D" in turn by pressing the button's up-arrow. But
> > what actually happens is that the first up-press gives "B" and
> > then subsequent up-presses leave the displayed value at "B": I
> > can't make it show "C" or "D". Can anyone tell me what I'm doing
> > wrong? Thanks!
>
> If you do anything fancy inside your GtkSpinButton::output signal
> handler (this basically means that you set spin button to hold
> non-numeric data like in your case), you need to also provide handler
> for GtkSpinButton::input signal. Input signal is not properly
> documented, but it's function is to take the contents of the spin
> button and convert it to gdouble number.
>
> I updated your sample code to show you how this fits together...

Perfect, thanks very much. It seemed to me that I should probably
be attaching to the the "input" signal, but I couldn't work out
how to do that.

Allin Cottrell

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to