[wxruby-users] Grid#get_selected_rows not working?

Trans transfire at gmail.com
Thu Mar 12 14:52:37 EDT 2009


Working with wxGrid. I can't seem to get any results for
#get_selection_rows. The array is alwasy empty. I ended up having to
something tricky:

      rows = []  # @grid.get_selection_rows (not working)
      top = @grid.get_selection_block_top_left.map{ |r,c| r }
      bot = @grid.get_selection_block_bottom_right.map{ |r,c| r }
      top.each_with_index do |t, i|
        rows.concat((t..bot[i]).to_a)
      end

Did I miss something or is this in fact a bug?


More information about the wxruby-users mailing list