def repaint #:nodoc:
      return unless @repaint_required
      #
      # TRYING OUT dangerous 2011-10-15 
      @repaint_required = false
      @repaint_required = true if @widget_scrolled || @pcol != @old_pcol || @record_changed || @property_changed

      unless @repaint_required
        unhighlight_row @old_selected_index
        highlight_selected_row
      end
      return unless @repaint_required
      $log.debug "BASICLIST REPAINT WILL HAPPEN #{current_index} "
      # not sure where to put this, once for all or repeat 2010-02-17 23:07 RFED16
      my_win = @form ? @form.window : @target_window
      @graphic = my_win unless @graphic
      raise " #{@name} neither form, nor target window given LB paint " unless my_win
      raise " #{@name} NO GRAPHIC set as yet                 LB paint " unless @graphic
      raise "width or height not given w:#{@width} , h:#{@height} " if @width.nil? || @height.nil?
      @win_left = my_win.left
      @win_top = my_win.top
      @left_margin ||= @row_selected_symbol.length
      # we are making sure display len does not exceed width XXX hope this does not wreak havoc elsewhere
      _dl = [@display_length || 100, @width-@internal_width-@left_margin].min # 2011-09-17 RK overwriting when we move grabbar in vimsplit

      $log.debug "basiclistbox repaint  #{@name} graphic #{@graphic}"
      #$log.debug "XXX repaint to_print #{@to_print_borders} "
      print_borders unless @suppress_borders # do this once only, unless everything changes
      #maxlen = @maxlen || @width-2
      tm = list()
      rc = row_count
      @longest_line = @width
      $log.debug " rbasiclistbox #{row_count}, w:#{@width} , maxlen:#{@maxlen} "
      if rc > 0     # just added in case no data passed
        tr = @toprow
        acolor = get_color $datacolor
        h = scrollatrow()
        r,c = rowcol
        0.upto(h) do |hh|
          crow = tr+hh
          if crow < rc
            _focussed = @current_index == crow ? true : false  # row focussed ?
            focus_type = _focussed 
            focus_type = :SOFT_FOCUS if _focussed && !@focussed
            selected = is_row_selected crow
            content = tm[crow]   # 2009-01-17 18:37 chomp giving error in some cases says frozen
            content = convert_value_to_text content, crow # 2010-09-23 20:12 
            # by now it has to be a String
            if content.is_a? String
              content = content.dup
              sanitize content if @sanitization_required
              truncate content if @truncation_required
            end
            ## set the selector symbol if requested
            selection_symbol = ''
            if @show_selector
              if selected
                selection_symbol = @row_selected_symbol
              else
                selection_symbol =  @row_unselected_symbol
              end
              @graphic.printstring r+hh, c, selection_symbol, acolor,@attr
            end
            #renderer = get_default_cell_renderer_for_class content.class.to_s
            renderer = cell_renderer()
            renderer.display_length = _dl # 2011-09-17 RK overwriting when we move grabbar in vimsplit
            renderer.repaint @graphic, r+hh, c+@left_margin, crow, content, focus_type, selected
          else
            # clear rows
            @graphic.printstring r+hh, c, " " * (@width-@internal_width), acolor,@attr
          end
        end
      end # rc == 0
      @repaint_required = false
      # 2011-10-13 
      @widget_scrolled = false
      @record_changed = false
      @property_changed = false
      @old_pcol = @pcol
    end
def repaint #:nodoc:
      return unless @repaint_required
      #
      # TRYING OUT dangerous 2011-10-15 
      @repaint_required = false
      @repaint_required = true if @widget_scrolled || @pcol != @old_pcol || @record_changed || @property_changed

      unless @repaint_required
        unhighlight_row @old_selected_index
        highlight_selected_row
      end
      return unless @repaint_required
      $log.debug "BASICLIST REPAINT WILL HAPPEN #{current_index} "
      # not sure where to put this, once for all or repeat 2010-02-17 23:07 RFED16
      my_win = @form ? @form.window : @target_window
      @graphic = my_win unless @graphic
      raise " #{@name} neither form, nor target window given LB paint " unless my_win
      raise " #{@name} NO GRAPHIC set as yet                 LB paint " unless @graphic
      raise "width or height not given w:#{@width} , h:#{@height} " if @width.nil? || @height.nil?
      @win_left = my_win.left
      @win_top = my_win.top
      @left_margin ||= @row_selected_symbol.length
      # we are making sure display len does not exceed width XXX hope this does not wreak havoc elsewhere
      _dl = [@display_length || 100, @width-@internal_width-@left_margin].min # 2011-09-17 RK overwriting when we move grabbar in vimsplit

      $log.debug "basiclistbox repaint  #{@name} graphic #{@graphic}"
      #$log.debug "XXX repaint to_print #{@to_print_borders} "
      print_borders unless @suppress_borders # do this once only, unless everything changes
      #maxlen = @maxlen || @width-2
      tm = list()
      rc = row_count
      @longest_line = @width
      $log.debug " rbasiclistbox #{row_count}, w:#{@width} , maxlen:#{@maxlen} "
      if rc > 0     # just added in case no data passed
        tr = @toprow
        acolor = get_color $datacolor
        h = scrollatrow()
        r,c = rowcol
        0.upto(h) do |hh|
          crow = tr+hh
          if crow < rc
            _focussed = @current_index == crow ? true : false  # row focussed ?
            focus_type = _focussed 
            focus_type = :SOFT_FOCUS if _focussed && !@focussed
            selected = is_row_selected crow
            content = tm[crow]   # 2009-01-17 18:37 chomp giving error in some cases says frozen
            content = convert_value_to_text content, crow # 2010-09-23 20:12 
            # by now it has to be a String
            if content.is_a? String
              content = content.dup
              sanitize content if @sanitization_required
              truncate content if @truncation_required
            end
            ## set the selector symbol if requested
            selection_symbol = ''
            if @show_selector
              if selected
                selection_symbol = @row_selected_symbol
              else
                selection_symbol =  @row_unselected_symbol
              end
              @graphic.printstring r+hh, c, selection_symbol, acolor,@attr
            end
            #renderer = get_default_cell_renderer_for_class content.class.to_s
            renderer = cell_renderer()
            renderer.display_length = _dl # 2011-09-17 RK overwriting when we move grabbar in vimsplit
            renderer.repaint @graphic, r+hh, c+@left_margin, crow, content, focus_type, selected
          else
            # clear rows
            @graphic.printstring r+hh, c, " " * (@width-@internal_width), acolor,@attr
          end
        end
      end # rc == 0
      @repaint_required = false
      # 2011-10-13 
      @widget_scrolled = false
      @record_changed = false
      @property_changed = false
      @old_pcol = @pcol
    end
this method chops the data to length before giving it to the
 renderer, this can cause problems if the renderer does some
 processing. also, it pans the data horizontally giving the renderer
 a section of it.