[Glade-users] reading from xml documents to combo boxes



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);
  
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20080313/4a97fccf/attachment.html 




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