Re: Signaling TreeView to update

Use a dispatcher in your GUI window that will call Gtk::Widget::queue_draw for your Gtk::TreeView whenever your thread updates the Gtk::TreeModel displayed by your Gtk::TreeView.

Bob Caryl

Joaquim Schmidlap wrote:
I'm writing an app using TreeModel / TreeView to show something like a
spreadsheet of real-time stock market data. The data is coming in
asynchronously on a background thread (previously created by ACE).

In my market data callback, I write the data into the TreeModel using the []

   m_row[m_columns.price] = price;

That works fine. The problem is that the TreeView does not seem to render
the new value until I do something to "wake up" the GUI, like mouse over the
window, etc.

As I understand it, I have one of two problems:

1) Writing into the TreeModel does not trigger the TreeView to refresh
automatically, so the view must be forced via a manual "repaint" method of
some kind that I haven't found yet,


2) The GUI event loop is blocked for some reason.

If it's problem 1, I hope someone can point me at the method to force a

If the problem is 2: regarding the event loop, in my main() function, I call


and I do it after I've launched my other threads. I would (perhaps naively)
assume that my ACE Reactors will do their thing for the background threads,
and the Gtk loop will do its thing on the "main" thread, and they should
just ignore each other (though I realize I'm at risk for collisions unless I
protect the gtkmm code with mutexes).

What am I missing here?

gtkmm-list mailing list
gtkmm-list gnome org


Robert L. Caryl Jr.
Fiscal Systems, Inc.
102 Commerce Circle
Madison, AL 35758-2706 USA
256-772-8922 ext. 108

This e-mail message may contain privileged or confidential information. If you are not the intended recipient, 
you may not disclose, use, disseminate, distribute, copy or relay this message or attachment in any way. 
If you received this e-mail message in error, please return by forwarding the message and it's attachment 
to the sender and then delete the message and it's attachment from your computer.

Neither Fiscal Systems, Inc., nor its affiliates, accept any liability for any errors, omissions, corruption 
or viruses in the contents of this message or any attachments that arise as a result of e-mail transmission.

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