Questions tagged [gtktreeview]

GtkTreeView is a widget for displaying both trees and lists. It is part of the GTK library.

217 questions
7
votes
2 answers

In Gtk, when using Drag and Drop in a TreeView, how do I keep from dropping between rows?

I'm testing a window that looks something like this: Dragging a Tag to a Card links the Tag to the Card. So does dragging a Card to a Tag. It's meaningless to drop a tag between two cards, or a card between two tags. I can ignore these outcomes in…
Matthew
  • 28,056
  • 26
  • 104
  • 170
6
votes
1 answer

How to make the last gtk.TreeViewColumn resizeable?

One can use gtk.TreeViewColumn.set_resizable(True) to make column manually resizeable... except the last column -- it always occupies the available space. While it's sensible in most cases, I use TreeView-in-a-ScrolledView, and I'd like to be able…
Andrey Paramonov
  • 409
  • 4
  • 11
6
votes
3 answers

Custom objects in ListStore/TreeStore

I have a list L of objects of my class A. This class implements __str__/__repr__, so each object has it's own string representation (not necessary unique). I have a GUI in pygtk, where I have a TreeView widget with only one column. I want to…
6
votes
1 answer

How to set the color of a single cell in a pygtk treeview?

I have a PyGtk treeview with a couple of columns. During runtime i add constantly new rows. Each cell contains a string. Normaly, i would use a gtk.CellRenderer for each row, but I want to set the background color of each cell, according to the…
Fookatchu
  • 7,125
  • 5
  • 28
  • 26
6
votes
0 answers

How to write a custom Gtk.CellRenderer which would show Gtk.ColorButton

I am using Python 3 and Gtk+ 3. I have a list of colors stored in a Gtk.ListStore. I want to display these colors as Gtk.ColorButton with a Gtk.CellRenderer so that the users would be able to view the colors and also change the colors too. My…
183.amir
  • 422
  • 3
  • 25
5
votes
1 answer

How do you change alternating background row colors of a gtk.TreeView in pygtk?

I'm trying to change the alternating background color of a treeview. I know that this should normally be left up to the theme, but I'd like to override to test the gtk Style functionality. According to the treeview documentation here, I learned…
Wes
  • 954
  • 13
  • 25
5
votes
3 answers

Can I add a column to an existing treemodel in gtk?

I have a treeview that is populated from a treemodel. I would like to add a colum to the treeview. Is it possible to draw the data for that column from a separate treemodel or can I append at runtime a column to the existing treemodel?
miller the gorilla
  • 860
  • 1
  • 7
  • 19
5
votes
1 answer

Bold/Unbold rows in PyGTK TreeView

I want to make some rows in my TreeView bold, and some not as I append them to TreeView, later on, I want to unbold rows on click. What is the easiest way to do this?
umpirsky
  • 9,902
  • 13
  • 71
  • 96
5
votes
1 answer

How to filter a GTK tree view that uses a TreeStore (and not a ListStore)?

I am using a Gtk.TreeView with a Gtk.TreeStore as a model for hierarchical data. As an example, let's take a music database organized into three levels: artist/album/title. I would like to filter this tree using a textual search field. For example,…
Zoltan
  • 2,928
  • 11
  • 25
5
votes
1 answer

GtkTreeView's row right click

How do I do something when user right click in a treeview's row?
thom
  • 51
  • 1
  • 3
5
votes
1 answer

How to use GtkTreeView correctly

I am using a TreeView with a ListStore as model. When the user clicks on a row I want to take some action but not using the values in the cells, but using the data I created the row from... Currently I have the TreeView, the TreeModel (ListStore)…
Nils
  • 9,682
  • 6
  • 46
  • 72
5
votes
1 answer

Get new selection in a GtkTreeView during the signal

I want to detect whenever the selection of my gtk.TreeView changes and, when it does, to call a function w/ this information. The only way I've found to do it so far is to attach to all these signals: ... …
Claudiu
  • 224,032
  • 165
  • 485
  • 680
5
votes
1 answer

In Gtk, what's the difference between a TreePath and a TreeIter?

I've been learning to use TreeViews, and these two types are often used for accessing a particular row of a tree. I don't really understand the difference between the two. My code is working--I convert back and forth between the two based on a…
Matthew
  • 28,056
  • 26
  • 104
  • 170
5
votes
2 answers

PyGtk How to change TreeView data using filter?

What I'm trying to do is dynamically change (via filter) list of strings. In my case it is list of files with paths stored in gtk.TreeStore. Example of expected effect (eg. Sublime Text 2 file searching Ctrl+P): Data: List of files…
scarab
  • 75
  • 1
  • 7
4
votes
3 answers

How to catch clicks in a Gtk.TreeView?

I'm trying to catch a double-click event in a TreeView's empty area to create a new node. Unfortunately standard way doesn't work. I've tried attaching ButtonPressEvent to both TreeView and the ScrolledWindow in which T.V. is hosted. I don't get any…
viraptor
  • 33,322
  • 10
  • 107
  • 191
1
2
3
14 15