[Glade-users] Re: i need help withglade



I don't mind helping.  In fact I enjoy it.  The part I enjoy is getting 
people out of a suck spot so they can move on.  The first project I 
thought you were having problems understanding how glade worked, so I 
wanted to show you how you would it.  I don't want to sound scollding, 
but you haveing even done the basics stuff I show you on the last 
project.  I'm not going to build your program for you.

You need to understand how GTK+ works.  Pick up a book, I recommend 
'Beginning GTK+/GNOME Programming' by Peter Wright by WROX press.  The 
is a websight and a mailing list for that as well.  You will also need 
to understand some C as well.


To do what you want, you will first need to pump out some signals from 
the buttons.  So open glade, click on the button.  In the 'Properties' 
window click on the 'Signals' tab.  At the bottom you will see 'signals' 
with an entry box to the right, with a button with "..." on it to the 
right of the entry box.  Click the "..." botton.  You will see an number 
of options.  you want the "clicked' signal.  You will also see am 
'Object' entry box.  Put the name of the widget you wish to effect.  In 
this case it's the name of the tree, in this case it's 'tree1'.  You 
must do that for each button (i.e. button1 and button2).  Then save, 
then build.  Open you favority programming text editor, I use Glimmer, I 
hear GIDE is good, there is also Emacs etc...  Open the Callbacks.c 
file.  Glade will have generated the signals there.  Goto the 
button1_clicked (or something like that) function.  In that fuction is 
where you will do that you what.

To insert data into a tree...I don't know off the top of my head, so I 
would go to the GTK+ refence manual and look it up.  

http://developer.gnome.org/doc/API/gtk/index.html

If you understand C, you should be able to figure this out.  If you 
don't.  Buy yourself a book on it.  Join the #c IRC room in openprojects.net

http://www.kiwi-magic.com/dev/c/

if it's still up, or go to to www.google.com and put in 'C tutor' and 
see what comes up.

If you run into a problem you can't figure out, see ask, but show me 
some sigh that I'm not jsut doing the work for you.

-Jeff





ahmed sbaa wrote:

hi jbrite ;
i hope that i dont disturb you by telling you an help....
now i want to do that:
there are two text text1 and text2
and two button button1 and button2
and a gtktree 
if i click button1 text1 will be added to gtktree as a root
if i click button2 text2 will be added as a child to the 
selected item in gtktree.
i send you with this message files generated by glade...
and thank you very very mutch for your help.....
ahmed
______________________________________________________
Bo�te aux lettres - Caramail - http://www.caramail.com

projet16.tar.gz

Content-Type:

application/octet-stream
Content-Encoding:

base64











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