Re: [PHP-GTK] GtkTreeView, database and load data on demand

[email protected] (Christian Weiske) Wed, 25 Nov 2009 06:41:51 +0100
Newsgroups php.gtk.general
Message-ID <[email protected]>
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 =-
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAksMw6IACgkQFMhaCCTq+CNLywCggMDY5aWW2U7PfOTqgOzMrGMg
CXkAniYvb6wz7HwukDyXNUFCU0xfIHuR
=nnP+
-----END PGP SIGNATURE-----