Re: Fwd: Perplexing Behavior of combobox



On Thu, Jun 10, 1999 at 03:30:57PM -0500, Matthew wrote:
> I'm experiencing some difficulty getting a combobox to populate correctly. 
> I've described the problem, including screenshots, at the web address:
> http://www.mattshouse.com/gtkproblem.html

Check the tutorial: http://www.gtk.org/tutorial/gtk_tut-9.html#ss9.11
Your problem is that you add to the list always the same buffer:
you need to g_strdup() the buffer.

combo1_items = g_list_append (combo1_items, g_strdup(buf));

Don't forget to g_free() the strings.
Also, it's fater if you prepend the items and then g_list_reverse() the
list.
The proper forum for this questions is gtk-list.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules



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