PHP-GTK
Thursday, December 18, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkListStore::set
GtkMenunext

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

GtkListStore::swap

Swaps rows a and b in the list store. Note that this function only works with unsorted stores.

Example 99. Swapping two rows

<?php
$store = new GtkListStore(Gobject::TYPE_STRING, Gobject::TYPE_LONG);
 
//insert the rows at different positions
$tokio  = $store->insert(0, array('Tokio', 34100000));
$mexico = $store->insert(1, array('Mexico city', 22650000));
 
//we swap so that mexico is first
$store->swap($tokio, $mexico);
 
//show the list
function echoRow($store, $path, $iter) {
    echo $store->get_value($iter, 0) . "\r\n";
}
$store->foreach('echoRow');
?>

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


previousGtkListStore::set
GtkMenunext

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