Re: [PHP-GTK] GtkTreeView, database and load data on demand
[email protected] (Christian Weiske) Thu, 26 Nov 2009 21:35:09 +0100
| Newsgroups | php.gtk.general |
|---|---|
| Message-ID | <[email protected]> |
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 =-
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iEYEARECAAYFAksO5oUACgkQFMhaCCTq+CO83wCfbP7iYzn+WSRlepfqfG8oq5zt w4kAn30q0Z91ywL25ZlWshHH8ZMBTA5N =BUcr -----END PGP SIGNATURE-----