[Glade-users] reading from xml documents to combo boxes
- From: tvb at gnome.org (Tristan Van Berkom)
- Subject: [Glade-users] reading from xml documents to combo boxes
- Date: Thu, 13 Mar 2008 13:50:45 -0300
On Thu, Mar 13, 2008 at 12:38 PM, Atmadarshini devi dasi
<atmadarshini_dd at yahoo.com> wrote:
hi there
I am trying to implement an address book and am using glade as the tool to
design my graphical user interface. I am programming in c and saving in an
xml document.
my graphical user interfce window consists of a combo box and a few text
entry boxes.
Now what I am trying to do is to read in from my xml documents into the
combo box and text entry boxes.
When i read into my text entry box, it is a success but I am having problems
reading into my combo box. I know that the part where i get the information
from the xml file is working because i can read the content onto the console
window.
I have pasted the code where i am trying to read into the combo box below.
Please tell me where I am going wrong. Thank you.
GtkWidget *vlname_entry_widget =
lookup_widget(GTK_WIDGET(view_address_window), "vlname_combo");
gtk_combo_box_set_active (GTK_COMBO_BOX(vlname_entry_widget),
address->lastname);
http://library.gnome.org/devel/gtk/stable/GtkComboBox.html#gtk-combo-box-set-active
"lastname" here should be an integer.
Cheers,
-Tristan
in the code above, address->lastname is pointing to the lastname node in the
xml document
GtkWidget *vfname_entry_widget =
lookup_widget(GTK_WIDGET(view_address_window), "vfname_entry");
gtk_entry_set_text(GTK_ENTRY(vfname_entry_widget), address->firstname);
this code above works fine. I can read the entry into the text entry box.
please help.
Thanks
Aakanksha
________________________________
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
now.
_______________________________________________
Glade-users maillist - Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]