Re: How to create unique widget when reusing widget id's from a GladeXML object.



dhk wrote:
I'm adding tabs to a notebook by getting the tab (a vbox) out of a GladeXML object. The tab widget returned from glade_xml_build_widget() can be added to the notebook and everything works fine.

The problem is when more tabs are added. It doesn't seem like the widget id's on each tab are exclusive to that tab. The last tab added behaves the best, but if a previous tab is clicked data entered and events on that tab appear on the last tab. This appears to be because the widget id's are the same in each tab because each tab was build from the same widget in the GladeXML file. What happens is when there are two tabs, the data placed in a field on tab one shows up in the field on both tabs. I thought the scope of the widget added to one tab would be out of scope for all other tabs.

How can a unique widget be created by using the same widget from a GladeXML object multiple times?

Thanks,
dave
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Does this have to do with referencing? It looks like the same resources are being used by the new widgets. Any ideas?

Thanks,
dave





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