Hi,
I’m using GridCellChoiceEditor for some cells in Grid object.
At the beginning values inside choice are initialized like in grid.rb
example
@editor_c = Wx::GridCellChoiceEditor.new([‘foo’, ‘bar’, ‘baz’])
@grid.set_cell_editor(4, 3, @editor_c)
After that when script is started this cell is empty and user can select
one of values. So this behavior is ok.
While program is running I want to add new values into this choice
editor, so I do next in the code:
@editor.set_parameters(“foo, bar, baz, new”)
After that nothing happens and choices still have the same old list of
values.
I also tried to use local variable for editor instead on instance
variable:
edit = @grid.get_cell_editor(4,3)
edit.set_parameters(“foo, bar, baz,new”)
@grid.set_cell_editor(4,3,edit)
Again list is not updated, and ‘new’ string is not added.
Only way I’ve found for now to be able to update editor, is to have
empty grid (so nothing is selected in choice cells), and then update
editor.
This is no acceptable for my application, because list of values in
choice cells should be updated during the program running few times
(depending on some other user actions).
What am I doing wrong?
Is it possible to update list of values in choice editor while program
is running?
Thanks in advance,
Marija