PHP-GTK
Saturday, July 04, 2009 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkListStore::clear
GtkListStore::insert_afternext

Last updated: Sat, 04 Jul 2009
view this page in English | Bulgarian | Japanese | Brazilian | Simplified Chinese

GtkListStore::insert

GtkTreeIter insert (int row [, array items ]);

Inserts a new row at the given position and returns the iterator for that specific row. After that, you can set the row data via set() method.

You can pass an array with the complete row data as second parameter, which automatically sets the data for you. The size of the array has to match the number of columns in the store, and the type as to be equal to the corresponding column type.

Example 93. Inserting some rows into a list store

<?php
//Create new store with two columns
$store = new GtkListStore(Gtk::TYPE_STRING, Gtk::TYPE_LONG);
 
//insert the rows at different positions
$store->insert(1, array('Tokio', 34100000));
$store->insert(0, array('Mexico city', 22650000));
 
//use the iterator to set the data after insertion
$iter = $store->insert(1);
$store->set($iter, 0, 'Seoul', 1, 22250000);
?>

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


previousGtkListStore::clear
GtkListStore::insert_afternext

Last updated: Sat, 04 Jul 2009
view this page in English | Bulgarian | Japanese | Brazilian | Simplified Chinese


credits 

PHP  Copyright © 2001-2009 The PHP Group
 All rights reserved.
Last updated: Sat Jul 4 01:52:29 2009 UTC