Someone have some example about how to use Gtk::CellRendererCombo
please help me I dont know how fix the model for the TreeViewColumn
that use this.
Mil L. wrote:
Someone have some example about how to use Gtk::CellRendererCombo
please help me I dont know how fix the model for the TreeViewColumn
that use this.
Hmm maybe these example helps a tiny bit
cell_renderer_combo = Gtk::CellRendererCombo.new
cell_renderer_combo.signal_connect(‘edited’) do |*args|
iter = tree_view.model.get_iter(args[1])
iter[cnum] = args[2]
end
cell_renderer_combo.has_entry = false # User cant type in text
Else, I think you just use it like any other cell render which you also
use in your tree view
Marc H. wrote:
Mil L. wrote:
Someone have some example about how to use Gtk::CellRendererCombo
please help me I dont know how fix the model for the TreeViewColumn
that use this.Hmm maybe these example helps a tiny bit
cell_renderer_combo = Gtk::CellRendererCombo.new
cell_renderer_combo.signal_connect(‘edited’) do |*args|
iter = tree_view.model.get_iter(args[1])
iter[cnum] = args[2]
endcell_renderer_combo.has_entry = false # User cant type in text
Else, I think you just use it like any other cell render which you also
use in your tree view
OK, thanks thanks, I got make and view
the Gtk::CellRendererCombo.new
Now Can I show diferent items in the model
of the Gtk::CellRendererCombo.new
by each row individualy??
Now Can I show diferent items in the model
of the Gtk::CellRendererCombo.new
by each row individualy??
Good question… maybe if you use different renderers?
Havent tried that yet really.
(Normally I only applied general styling options, like
background colour and similar.)