def range_select crow=@obj.current_index
      #alert "add to selection fired #{@last_clicked}"
      @last_clicked ||= crow
      min = [@last_clicked, crow].min
      max = [@last_clicked, crow].max
      case @obj.selection_mode 
      when :multiple
        if @selected_indices.include? crow
          # delete from last_clicked until this one in any direction
          min.upto(max){ |i| @selected_indices.delete i 
                         @obj.fire_row_changed i
          }
          lse = ListSelectionEvent.new(min, max, @obj, :DELETE)
          @obj.fire_handler :LIST_SELECTION_EVENT, lse
        else
          # add to selection from last_clicked until this one in any direction
          min.upto(max){ |i| @selected_indices << i unless @selected_indices.include?(i) 
                         @obj.fire_row_changed i
          }
          lse = ListSelectionEvent.new(min, max, @obj, :INSERT)
          @obj.fire_handler :LIST_SELECTION_EVENT, lse
        end
      else
      end
      @last_clicked = crow # 2014-04-08 - 01:21 this was missing, i think it is required
      self
    end
def range_select crow=@obj.current_index
      #alert "add to selection fired #{@last_clicked}"
      @last_clicked ||= crow
      min = [@last_clicked, crow].min
      max = [@last_clicked, crow].max
      case @obj.selection_mode 
      when :multiple
        if @selected_indices.include? crow
          # delete from last_clicked until this one in any direction
          min.upto(max){ |i| @selected_indices.delete i 
                         @obj.fire_row_changed i
          }
          lse = ListSelectionEvent.new(min, max, @obj, :DELETE)
          @obj.fire_handler :LIST_SELECTION_EVENT, lse
        else
          # add to selection from last_clicked until this one in any direction
          min.upto(max){ |i| @selected_indices << i unless @selected_indices.include?(i) 
                         @obj.fire_row_changed i
          }
          lse = ListSelectionEvent.new(min, max, @obj, :INSERT)
          @obj.fire_handler :LIST_SELECTION_EVENT, lse
        end
      else
      end
      @last_clicked = crow # 2014-04-08 - 01:21 this was missing, i think it is required
      self
    end
Range select.
 Only for multiple mode.
 Uses the last row clicked on, till the current one.
 If user clicks inside a selcted range, then deselect from last click till current (remove from earlier)
 If user clicks outside selected range, then select from last click till current (add to earlier)
 typically bound to Ctrl-Space (0)

 @example

     bind_key(0) { range_select }