Re: spin buttons
- From: Jeff Shipman <shippy nmt edu>
- To: Loban Rahman <loban earthling net>
- Cc: Sven Neumann <sven gimp org>, GTK List <gtk-list gnome org>
- Subject: Re: spin buttons
- Date: Wed, 14 Feb 2001 15:28:27 -0700 (MST)
> The difference would be that your function gets called by connecting it
> to the value_changed signal of the three adjustments of the three
> buttons. Your function would then read all 3 adjustments and then
> set_value them to whatever you want. That way your algorithm code
> doesn't get intersperced in your gui code, making it easier to call that
> algorithm code from that other function you were talking about.
> Oh, and to answer your question, i don't think gtk_adjustment_set_value
> will set the click_child of the spin button.
I don't connect it to the adjustment because then I have no
way of knowing which of the three spinbuttons were pressed,
and therefore I have no access to click_child which I MUST have.
I must have this because I need to know whether the value is
going up or down. This is because the value needs to wrap around.
If I was to simply set_value on it, then it would not wrap and
instead would stop at the maximum value. This is why I use
gtk_spin_button_spin() in my handler rather than set_value.
My handler already takes care of the three spin buttons as long
as you click on one of those three. The problem arises from
a fourth spin button that needs to affect those spinbuttons but
its value is completely different. I would like to just tell
it to spin up or down the proper amount of times, but when
my handler goes to check if it's going up or down, it doesn't
know (because gtk_spin_button_spin()) doesn't set click_child and
again, I must know whether the up or down arrow was clicked. If
I could cause the up or down arrow to manually be clicked rather than
using gtk_spin_button_spin() then that would solve my problem
of click_child not being set.
I suppose there is a way to differentiate between the three
different adjustments after all (using the widget passed in),
but this really doesn't change my situation any.
Again, it works fine using one of the three spin buttons, but if
I use the fourth one, it just spins up to the maximum and stops
(because there's no click_child).
Jeff "Shippy" Shipman E-Mail: shippy nmt edu
Computer Science Major ICQ: 1786493
New Mexico Institute of Mining and Technology
] [Thread Prev