Re: [PHP-GTK] GtkTreeView, database and load data on demand
[email protected] (Alexander Bögl) Fri, 27 Nov 2009 08:41:18 +0100
| Newsgroups | php.gtk.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Christian! Seems to be a solution for me, I will try it. Thank you! Am 26.11.2009 um 21:35 schrieb Christian Weiske: > Hello Alexander, > > >> Hm, I think my explaination was not really clear. :-) > It was actually very 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. > Yep, and I was talking about that. Note that I am talking about > php-gtk2. > >> 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 > You do not need any of this, because the treeview automatically does > this for you. > > The only thing you need to do is adding dummy rows to your > GtkListStore > and have your cell renderer fetch the row data from database that is > going to be displayed. > > -- > Regards/Mit freundlichen Grüßen > Christian Weiske > > -= Geeking around in the name of science since 1982 =-