Re: Treeview scrolling question



On Mon, Jan 06, 2003 at 03:31:24PM +0100, danny van elsen wrote:

Rather, I would like to override the default scroll behaviour,
and insert different strings into the treeview, after every scrolling 
action.

I may be wrong, but that sounds like a lot of pain for little gain in either
memory footprint or speed.  Also scrolling might be jerky if your doing
insertions to the treemodel everytime the scrollbar is moved.

Since these strings are already in memory, you might think about "wrapping"
your data structure in your own TreeModel (i.e. derive from GtkTreeModel).
Then the treeview just tracks the state of your data structure automatically
(as long as the TreeModel is implemented correctly) and no insertions are
necessary.  There is an example of this in the pygtk distribution, but
perhaps someone else knows of a C example.  GOB may be useful for
implementing your own TreeModel:

http://www.5z.com/jirka/gob.html

Dave Cook



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