[Glade-users] Spin buttons.....



Hello, I'm trying to use spin buttons to send value of the button to
variables in my program but I didn't succeed well...

I've use the standard commands found in the faq but I have some trouble.

Here is the code I used:

void
on_preferences1_activate        (GtkMenuItem    *menuitem,
                                 gpointer        user_data)
{
   GtkWidget *prefs;
   GtkWidget *value;

   prefs = create_sizelattice ();
   gtk_widget_show (prefs);

   value = lookup_widget (prefs, "spinbutton1");
   gtk_signal_connect (GTK_OBJECT (GTK_RANGE (value) -> adjustment,
"changed", GTK_SIGNAL_FUNC (on_spin_button1_changed);

}

The function on_spin_button1_changed was directly generated by glade
using properties -> signal but it's not alreday implemented. The
'sizelattice' is a dialog window that work fine except spinbuttons
inside it. 

While compiling, I obtained:

In function "on_preferences1_activate":
tow few arguments to function 'gtk_signal_connect'
error 1

So what did i wrong ?

Another question ... what represent 'adjustment' ?

Could someone explain me ? or send me an example or both ?

Thanks in advance 

Valery Avaux





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