Re: Spin Buttons



> >I'm having trouble with signals; I made a spin button as a counter of input fi
> >les and I would like to get its int value (gtk_spin_button_get_value_as_int) w
> >henever the button's changed in order to use it in another loop to create text
> > entry fields for filenames. So, if someone changed the spin button value, I'd
> > like to change the number of text entries accordingly and, most importantly, 
> >immediately, and not through "Apply" Button kind of way.
> 
> you should connect to the "changed" signal of the GtkAdjustment
> associated with the spin button.
> 

I see. But is there a way to assign the value of a spin button directly to a variable instead of going through a function and thus being forced to have global variables? In example, if I want to assign the value of a spin button to a float variable a (declared locally), what do I do? Is it possible to use sth like

a = gtk_spin_button_i_dont_know_what (Spin);    ? ;)

Thanks and I apologize to bother you with newbie questions!

Andrej




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