Re: [PyGObject] TreeView: edit a cell like in excel



Hi Reuben,

thanks for your answer.

On 2019-02-26 07:16 Reuben Rissler <silrep emypeople net> wrote:
On 02/26/2019 04:43 AM, c.buhtz--- via python-hackers-list wrote:
I want to make the user renaming text-items in a Gtk.TreeView.  
Is this a multi column Treeview? If so, which column text should be 
selected? The first one?

Yes it is the first one. I tried like this.

class MyTreeView(Gtk.TreeView):
    # ...
    def test_cell_edit(self):
        # first column and its renderers
        col = self.get_column(0)
        ren = col.get_cells()
        # path related to specific data
        path = self._model._get_path(-1101)
        #
        self.set_cursor_on_cell(path, col, ren[0], True)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]