PHP-GTK
Sunday, October 26, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkListStore::remove
GtkListStore::swapnext

Last updated: Sun, 12 May 2013
view this page in English

GtkListStore::set

void set( GtkTreeIter iter , column, value [, column [, value]]);

Change the data of certain columns of the row given by iter.

The second parameter is the number of the column which data shall be changed, and the third parameter is the actual data. You can change more than one column by adding more column number/data pairs to the method.

Example 98. Inserting some rows into a list store

<?php
//Create new list store with string and number columns
$store = new GtkListStore(Gobject::TYPE_STRING, Gobject::TYPE_LONG);
 
//at first, get an iterator for a new row
$iterator = $store->append();
//now use that to set the name at that row (column 0)
$store->set($iterator, 0, 'Tokio');
//same row: set the inhabitants into column 1
$store->set($iterator, 1, 34100000);
 
//You can set a whole row at once:
$iterator = $store->append();
//we add the data "Mexico city" at column 0 and 
// "22 million" at column 1 at the row $iterator
$store->set($iterator, 0, 'Mexico city', 1, 22650000);
 
//Even faster: don't even create an iterator variable
$store->set($store->append(), 0, 'Seoul', 1, 22250000);
?>

User Contributed Notes
gtk.gtkliststore.method.set.php
add a note about notes
There are no user contributed notes for this page.


previousGtkListStore::remove
GtkListStore::swapnext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:50:59 2013 CEST