Re: GtkTreeView, database and load data on demand

From: Date: Thu, 26 Nov 2009 20:24:02 +0000
Subject: Re: GtkTreeView, database and load data on demand
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-8439@lists.php.net to get a copy of this message
Hi Christian! Hm, I think my explaination was not really clear. :-) For example, I had a table with 300000 rows, and I want them to view in a TreeView over a slow WAN link. To save time, bandwidth and memory it would be great to load only a part of the whole data, that part that is needed to draw the TreeView on the screen. To do this, I need at least: * the Rows that are currently on the screen * signals on scrolling/resizing of the TreeView to load the needed Data from the DB * manupulating the scrollbar Otherwise I must set some limitations that may confuse the users... Greetzs, Alex Am 25.11.2009 um 06:41 schrieb Christian Weiske:
Hello Alex,
I try to program a class to view big database tables with GtkTreeView simular to the data-aware components in Delphi, Basic, etc, which loads only the data from the DB what it has to view, but it seems difficult get scrollbar positions, or the number of the selected row. Has someone a hint for me how to get rid of this?
Due to the MVC-structure of Gtk2's components, you do not need any of the data you described. Just implement your own model class and attach it to the tree view. The right methods in your model class will get called, allowing you to fetch the needed data. --Regards/Mit freundlichen Grüßen Christian Weiske -= Geeking around in the name of science since 1982 =-


« previous php.gtk.general (#8439) next »