From a Gtk::Builder I've retried a pointer to a Gtk::ListBox from a glade file, called listbox_serverlist
.
Here is a minimal piece of code that I belive sums it up:
Gtk::ListBox* listbox_serverlist;
builder->get_widget("listbox_serverlist", listbox_serverlist);
Gtk::Label l;
l.set_text("Test");
listbox_serverlist->insert(l, -1)
Immediately after this, I run the main window, which the listbox is in.
My issue is that, although the listbox results in not being empty, there certainly isn't any text in it. I was hoping for my label to appear as an item in the list box, but instead there seems to be one selectable item, but it's completely blank.
Is there any code I must write to perhaps update the actual text in the label, or something to this effect?
I hope my question is clear, but I'd be happy to provide more information.