Moving rows included on a gtk treeview using a single button

Hello everybody i’m new here :), I’m trying to get handle of gtk
right now, i know how to create rows, columns and some else, but i have
problem, i want to move the rows using a button, come on the classic up
down, well i don’t an idea to do that =/ i’m learning about ruby + gtk,
think this combination is simply wow, here is the code i’m using glade,
libglade can someone let me a little of light?, some example to do that
just talk me something about, using glade or simple gtk.

here you can see my screenshot:

how you can see, i’m following some of your examples.
watch the picture too, to get a better idea.

I extend my regards to everyone greetings.

Julio César Sosa Yeladaqui.


#!/usr/bin/env ruby

treeview.rb - Ruby/Libglade2 sample script.

Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
This program is licenced under the same licence as Ruby-GNOME2.

$Id: treeview.rb,v 1.5 2006/06/17 14:14:55 mutoh Exp $

Manejo y control de Listas o treeview de gtk mediante glade en Ruby

Crear ---------- Si

Ordenar -------- Si

Eliminar ------- Pendiente

Mover Arriba/Abajo -------Pendiente

require ‘libglade2’

class Treeview
def initialize(path)
@glade = {|handler| method(handler)}
@treeview = @glade[“treeview1”]
@model =, String)

crt =

column =“Test”,,

{:text => 0})

column2 = Gtk::“hola”,,
{:text => 1})

column ="Test", crt, {:text => 0})
column2 ="hola", crt, {:text => 1})


root_iter = @model.append(nil)

rootx_iter = @model.append(nil)

@treeview.append_column (column)

root_iter.set_value(0, "hello guys")

rootx_iter.set_value(0, "moco")

child1 = @model.append(root_iter)

child1.set_value(0, “Child1”)



root_iter = @model.append(nil)

root_iter.set_value(1, "jojojo")

rootx_iter.set_value(1, "loco")

hijo_col2 = @model.append(root_iter)

hijo_col2.set_value(1, “yo no jui”)

@treeview.set_model (@model)

@treeview.set_size_request(200, 200)