[Gtk-sharp-list] Adding a Lot of Rows into a TreeView

KLessou klessou at gmail.com
Mon Mar 5 16:06:06 EST 2007


On 3/5/07, KLessou <klessou at gmail.com> wrote:
>
> Thx,
>
> Can I create a temporary TreeStore to keep the possibility to select old
> TreeIter during the work ?
>
> Like this :
>
> TreeStore tmpstore = new TreeStore (store);
>
> _treeview.Model = tmpstore;
>
> while (xxx)
> {
>    ...
>
>     store.Append (out iter);
>     store.SetValue (iter, 0, imagePreview);
>     store.SetValue (iter, 1, description);
> }
>
> _treeview.Model = store;
>
> On 3/5/07, David Anes <david.anes at gmail.com> wrote:
> >
> > Hi Klessou.
> >
> > Detach the model from the TreeView, add all rows, attach the model
> > again. This will prevent relayout of the treeview on every row insertion.
> >
> > Cheers,
> > David Anes.
> >
> > 2007/3/5, KLessou <klessou at gmail.com>:
> > >
> > > Hello,
> > >
> > > I have to insert a rows into a TreeView. Long time even on powerful
> > > machines once the model contains more than a couple of thousand rows, the
> > > insertion rate decreasing exponentially.
> > >
> > > Is there any solution to increase the insertions' rate ?
> > >
> > > --
> > > ~~~~~
> > > | klessou |
> > > ~~~~~
> > > _______________________________________________
> > > Gtk-sharp-list maillist  -   Gtk-sharp-list at lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> > >
> > >
> >
>
>
> --
> ~~~~~
> | klessou |
> ~~~~~




-- 
~~~~~
| klessou |
~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070305/5db44e14/attachment.html 


More information about the Gtk-sharp-list mailing list