Re: Saving data from a TreeView when pressing a button

On 2010-10-13 20:48, Jong Bor Lee wrote:

I have a TreeView connected to a model (a ListStore). The TreeView shows the
data that is stored in the ListStore and the ListStore gets updated when the
user enters data into a cell, so you could say it works fine.

Except in the following case: once the user is done editing, he presses a
button in order to go to the next step. If the user is currently editing a
cell, the changes in that cell will be lost. If the user presses enter or
clicks on another cell after editing, the changes will be saved. But it
isn't natural to do so, he will just press "Next" and expect the data to be

So my problem is: how do you save changes from a editable cell when a button
(unrelated to the cell) is pressed?

I did have the same problem and was not find a solution too (actually I am not familiar with gtk). But now I have tried to use GtkTable to edit tabled-data and it seems to works fine for me. It even tabs from one cell to another - without any changes.

Probably TreeViews are not really designed to be editable ...

mit freundlichen Grüßen
Herbert Gasiorowski

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