Re: [gtk-list] CList updates



Matt and Amy Gilbert wrote:
> 
> I have a question about using a CList. I have a simple
> app that will receive a string from a socket and
> display it in a CList. It will also send data. I am
> using pthread's for receiving data. I know its over
> kill to use a seperate thread for this but I am just
> trying to familiarize myself with some of the tools.
> 
> The problem I am having is that whenever I use
> gtk_clist_append I have to press a key or move the
> mouse in and out of the window in order for this
> change to be displayed. Do I need to force the
> redisplay of the CList and if so how do I do that.
> 
> I have tried using gdk_init_thread and surrounding
> gtk_main with gdk_thread_enter and gdk_thread_leave.
> However, this just hung my app.

If you've got the CList in a ScrolledWindow then you must use
gtk_scrolled_window_add_with_viewport() rather than gtk_container_add().

I had exactly the same symptoms in some test code and making the above
change has finally got it working!

Cheers, Matt.

-- 
Matt Goodall             |  Isotek Electronics Ltd
email: mgg@isotek.co.uk  |  Claro House, Servia Road
Tel: +44 113 2343202     |  Leeds, LS7 1NL
Fax: +44 113 2342918     |  England



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