[Glade-users] Buttons



--- Xavier Bestel <xavier bestel free fr> wrote:
I'm certainly no glade expert, but what I'd do in
this case is, using
the drop menu just under the "..." button in the
signal section, just
set the callback to gtk_main_quit directly.
This always worked for me, and this spares a useless
callback.

      Xav

le mar 16-10-2001 � 08:01, Dan LeBlanc a �crit :

Any widget, buttons included, emitte a 'signal'.

The simpliest thing to do 
is, while in glade, click on the button, go over
to
the 'properties window', 
click on the 'signal tab'.  You will see
'Signal',
'Handeler', 'Data' etc.  
On the far right of Signal you will see a button
with '...' on it.  Click it. 
 A dialog box will pop up asking you which
signal do
you want.  Click on the 
'CLICKED' signal.  Save and build.  This will
create
a an entry in the 
callbacks.c file.  Load up a text editor (I use
glimmer, others use glide, 
emacs, whatever you like.)  You put the code you
wish executed in that entry 
in the callbacks.c file.  (In case you don't
know,
that is in the /src file.)


Son of a gun ... I didn't even know about that one!
I'll bet Glade has a lot of goodies people don't know
are there. Thanks for the tip.

Unfortunately, due to the lateness of the hour and the
presence of a quantity of Anheuser-Busch products, my
post somehow ended up embedded in someone else's. I
apologize for that.

My purpose was not so much to explain how to close a
program as to show the similarity between a GTK+
signal handler and a Visual Basic event procedure, for
the benefit of a programmer with some VB background
(of which I also have some).

I'll continue to keep reading and keep learning, and
will offer help when I can.
 


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com





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