[Gtk-sharp-list] Refresh of elements in a treeview
Mike Rhodes <firstname.lastname@example.org>
Tue, 16 Nov 2004 22:10:57 +0000
I'm not sure if he means corruption when redrawing the tree, but
refreshing when the tree model changes. I have some problems with this
on a gtk# application I am writing.
In basic terms, I have several items that I add to a treeview. I then
start a thread that updates these items with more detailed information
that needs to be drawn into the treeview to replace the current data.
Each item is added to the list store as follows:
TreeIter iter =3D list_store.AppendValues(filename, filepath, ti);
The gmr object has a function that is launched in a thread, and pretty
foreach iter that has been added to gmr
// this adds new data about the row in the treeview
// tell treeview displaying list_store row has changed
list_store.EmitRowChanged(st.GetPath(ipp.iter), ipp.iter); =20
The ti object is packed into the treeview and I have a cell data
function that pulls data from the ti object to decide what to draw.
Initially it displays a file path. After the GetMetaData() call, it
should start to display more detailed information on the file. The
treeview doesn't change its contents, however, until the treeview is
redrawn (e.g. scrolled or pass the mouse over it).
>From what I understand, the EmitRowChanged() signal should tell the
tree view that the data for row has changed and it needs to update it.
I would have thought this would cause a redraw of the row. This
doesn't seem to be the case, as the row doesn't change until user
interaction causes a redraw, invoking the cell data function when it
Is there a way to get the row to redraw without user interaction causing it=
On Tue, 16 Nov 2004 09:07:55 -0600, Federico Mena Quintero
> On Sat, 2004-11-13 at 12:58 +0100, Ra=FAl Moratalla wrote:
> > I don't know if it will be due to my system (Suse 9.1) but if the treev=
> > doesn't resfresh the items correctly I can't develop my program and of =
> > use another programs as cdcollect :(
> What version of GTK+ does SuSE 9.1 use? Some really old versions are
> known to have redraw problems in the tree view.
> Gtk-sharp-list maillist - Gtkemail@example.com
"One should not aim at being possible to=20
understand but at being impossible to
misunderstand." - Quintilian