[Glade-users] Buttons
Dan LeBlanc
dleblancus@yahoo.com
Mon, 15 Oct 2001 23:01:22 -0700 (PDT)
--- jbrite <jbrite@webdsi.com> wrote:
> Wecome to the linux community!
>
> I don't know visial basic so I connot contrast it,
> but I'll try to help
> anyway. I don't know what you know, so it's hard to
> write up a help. One
> persons question implied he thhought glade would
> write code for him to get
> widgets to interact, when what it just writes the
> code for the front end.
> You have to do the rest.
>
> anyway, here goes...
>
> 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.)
>
If your button is named "end_button", the function
generated in "callbacks.c" will be named
"on_end_button_clicked(/* a bunch of arguments you
probably don't need to use */)". This is about the
same as the VB Private Sub cmdEnd_Clicked() procedure
(assuming you named your button cmdEnd). You have to
put your code to end the program here. I don't know
what your program does, but this may as simple just
saying "gtk_main_quit()"
> Once someone asked me for help connecting a few
> items. An entry box for the
> user to put text, a button that when clicked will
> drop the text into a list
> box. I'll send you the program. The user face
> looks a little slappy (I
> didn't create it, nor did I fix it) but it does show
> how this is done. I'm
> going to send this file to you. If anyone else
> wants it, send me an e-mail.
>
> -Jeff
>
>
> On Saturday 13 October 2001 10:23 am, Ishan
> Chattopadhyaya wrote:
>
> > > Hi
> > I am a new user to Linux and Glade. I earlier used
> Visual Basic (in
> > Windows). I want to know that when I add a Button
> widget, how do i make
> > sure that when the user clicks the button, the
> program ends. In other words
> > I want to assign a command to the button. Please
> give a detailed help as i
> > am a beginner to the terms used in Linux and
> Glade. I would be really
> > grateful to the Linux community if anyone can
> help.
> >
> > Sincerely,
> > Ishan Chattopadhyaya (15 years old)
>
> ----------------------------------------
> Content-Type: text/html; charset="iso-8859-1";
> name="Attachment: 1"
> Content-Transfer-Encoding: quoted-printable
> Content-Description:
> ----------------------------------------
>
>
> _______________________________________________
> Glade-users maillist - Glade-users@ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-users
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com