Re: Newbie still with probs...



I mean, where in the code do I have to assign the content of the entry to the
field of a structure? do u get the point of what I mean?

See the examples that come with Gtk, you might use functions like:

char *string = gtk_entry_get_text (GTK_ENTRY (entry));
gtk_entry_set_text (GTK_ENTRY (entry), string);

You can connect a signal to the entry widget and
pass that structure as a parameter. Everytime the user
changes the text of the entry or after she/he presses
Enter, or when she/he presses Ok, your callbak will
be called and you can assign the content of the entry 
to the field of the structure. 

Now inside this callback you can do whatever you want, 
for example change some other widget, for example change 
a label string to the text that is in the entry.

Say, the user writes in the entry, "Hullo world"
and that string immediately appears in your label" ;-)

after you master the basic concepts you will be fine...

Carlos




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