tags:

views:

176

answers:

1

Please take a look at this picture:

http://www.uzbozor.com/uploads/Screenshot.png

I want to create a list container as shown in that picture. How do i do it in pygtk using glade? What is that item called?

Thanks

+2  A: 

That looks like a TreeView widget.

Create the TreeView with the set_headers_visible = False. And set_rules_hit = True

Use a simple ListStore and one TreeViewColumn with a CellRendererText.

To get the scrollbar, put the TreeView inside a ScrolledWindow

To create the widget using Glade, you will need a recent version (3.6+) and a project with the GtkBuilder format. Here is a tutorial on how to create TreeViews and models using Glade 3.

Then you can load the GtkBuilder file using something like this:

builder = gtk.Builder()
builder.add_from_file("gui.glade")
builder.connect_signals({ "on_window_destroy" : gtk.main_quit })
self.window = builder.get_object("window")
self.window.show()
Manuel Ceron
Thanks a lot. Highly appreciated.
Baha