I have compiled code that generates a two column list store with gtk2. I
have enabled one column to be editable but I cannot figure out how to
store the data that I type into the cell. Every time I enter a number
into the cell and press enter it goes back to zero.
Here is a sample of the code:
@nodeListStore = Gtk::ListStore.new(String)
@destListStore = Gtk::ListStore.new(String,Integer)
@costRender = Gtk::CellRendererText.new.set_editable(true)
@nodeCol = Gtk::TreeViewColumn.new("Node Name",
Gtk::CellRendererText.new, :text=>0)
@destCol = Gtk::TreeViewColumn.new(“Destinations”,
Gtk::CellRendererText.new, :text=>0)
@costCol = Gtk::TreeViewColumn.new(“Cost”,@costRender,:text=>1)
@nodeTreeView = Gtk::TreeView.new(@nodeListStore)
@nodeTreeView.append_column(@nodeCol)
@nodeTreeView.selection.set_mode(Gtk::SELECTION_SINGLE)
@destTreeView = Gtk::TreeView.new(@destListStore)
@destTreeView.append_column(@destCol)
@destTreeView.append_column(@costCol)
@destTreeView.selection.set_mode(Gtk::SELECTION_SINGLE)
Any Suggestions