Re: spin buttons



Hi,

Jeff Shipman <shippy nmt edu> writes:

> I'm having a bit of difficulty with spin buttons. I
> would like to have three spin buttons tied together,
> one for the day, month, and year and then when
> the day goes past the number of days in the month,
> it goes back to one and increments the month. I've
> been able to implement this inside the handler for
> the spin button, but I also need to handle this
> from another function. I would like to do this without
> having to repeat the code a million times, and the
> main thing I need is the click_child information
> from the spin button. gtk_spin_button_spin() doesn't
> set a click_child, and if I set it manually, it's
> a pain to get it back to what it should be. Is there
> a way to get a hold of the actual button that is
> part of an adjustment and cause it to click? That
> way, the click_child will actually be set.

Why do you fiddle around with the spinbuttons signals
at all? Spinbuttons are only views on GtkAdjustments, 
so you should connect to the value_changed signal of 
the adjustments and use gtk_adjustment_set_value() to
set the values to assure that the signal is emitted 
correctly.


Salut, Sven





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]