PHP-GTK2 Newsletter
|
Sample Code 27: How to display a 2D array in GtkTreeView - Part 1? |
| Written by kksou | ||||||
| Thursday, 21 September 2006 | ||||||
|
Problem GtkTreeView is an extremely useful widgets to display both a list view as well as a tree structure. This article introduces the basics of setting up a treeview. We will display a 2D array in a list view as shown below:
Solution To display data in a treeview, the standard steps are:
Sample Code
Explanation The way to display a list is very different between PHP-GTK1 and PHP-GTK2. PHP-GTK2 adopts the data-view concept. The data is stored is a data model (e.g. GtkListStore or GtkTreeStore), and we create a view to display the data.
Note
Yes, I know you must have noticed that there are many rooms for improvements for the above list view:
Related Links
User reviews Average user ratings: 5.0 (from 4 users) Note: You have to be a registered member to leave a comment. Free registration here. |
||||||
| < Prev | Next > |
|---|







March 07, 2009 12:24pm
August 25, 2009 4:34pm
September 27, 2009 8:13pm
Nice explanation.
December 04, 2009 1:46am