Re: Output

On Sunday 03 June 2001 01:36 pm, gd001 wrote:
How does one make the buttons do something. For example, I've been
exploring the Glade packages which came with the Linux distribution. Now
it all looks wonderful, but after studing GTK I can't figure out how to
attache an event to these graphics. Should I write a C program function
and can it be called by pushing a button?

You need to connect the "clicked" signal to some function, like this:
gtk_signal_connect(GTK_OBJECT(button), "clicked",
        GTK_SIGNAL_FUNC(funce), userData);

Pennington's book, GTK+/Gnome Application Development, covers this. It's a
free book (as in speech, and as in beer), and is available from It's a good intro. You can check the gtk+ api reference
at for more on button signals (or anything else about gtk).

"and fuck moments                       "If there's another life,
I want an hour to once again be         And if I get to choose,
a long time."                           I'd like to be a daisy."
        -Out Loud,                              -Greening of America,
        Tim Mason                               Counting Crows

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