Search code examples
cgtkglade

How to add widget to glade file?


I want to create some entry box in a window. But I must create them with some elements from a xml file. So I must create dynamic entry boxes in window. I cannot do it with glade. Because the number of boxes can change by elements.

How can i add widgets to glade file in my code instantly in C?


Solution

  • You can't add widgets that way to the glade file. What you need to do is just load the window with GtkBuilder, and then programmatically add your widgets to it as you would do when constructing an GUI by hand. So you just add you widgets to the container where you want to place them.