Hi guys,
I looked through the archives for a solution to this problem, but the
only solution I found still seg-faulted for me. Basically, if you want
to create a GtkCList with titles, you need to use the function call
GtkWidget * grid;
char *blankrow[] = {"", "", "", ""};
gtk_clist_new_with_titles(4, blankrow);
The problem is, since I want to build the GtkCList with the result of an
SQL query, I'm not going to know ahead of time exactly how many columns
are going to be needed. I will be able to find out how many columns are
needed after the program has started, and use that to dynamically create
the blankrow, but so far, every way I've tried has come up empty.
Hard-coding the blankrow like I did above isn't an option.
My question is this: how do I create blankrow of N columns containing N
""'s, during runtime? Maybe this is more of a C question than a Gtk
question... if anybody could help, I'd really appreciate it. I'm going
nuts here.
The only solution put forward, to initialize it using
widget = gtk_clist_new_with_titles(cols, "");
didn't work when I had more than 2 columns.