def repaint
      @color_pair ||= get_color($datacolor, @color, @bgcolor) 
      # earlier attrib defaulted to REVERSE which was surprising.
      _attr = @attr || Ncurses::A_NORMAL
      len = @form.window.getmaxx # width does not change upon resizing so useless, fix or do something
      len = Ncurses.COLS if len == 0 || len > Ncurses.COLS
      # this should only happen if there's a change in window
      if @row_relative
        @row = Ncurses.LINES+@row_relative
      end

      # first print dashes through
      @form.window.printstring @row, @col, "%s" % "-" * len, @color_pair, _attr

      # now call the block to get current values
      if @command
        ftext = @command.call(self, @args) 
      else
        status = $status_message ? $status_message.value : ""
        #ftext = " %-20s | %s" % [Time.now, status] # should we print a default value just in case user doesn't
        ftext = status # should we print a default value just in case user doesn't
      end
      # 2013-03-25 - 11:52 replaced $datacolor with @color_pair - how could this have been ?
      # what if user wants to change attrib ?
      if ftext =~ /#\[/
        # hopefully color_pair does not clash with formatting
        @form.window.printstring_formatted @row, @col, ftext, @color_pair, _attr
      else
        @form.window.printstring @row, @col, ftext, @color_pair, _attr
      end

      if @right_text
        ftext = @right_text.call(self, @right_args) 
        if ftext =~ /#\[/
          # hopefully color_pair does not clash with formatting
          @form.window.printstring_formatted_right @row, nil, ftext, @color_pair, _attr
        else
          c = len - ftext.length
          @form.window.printstring @row, c, ftext, @color_pair, _attr
        end
      else
        t = Time.now
        tt = t.strftime "%F %H:%M:%S"
        #r = Ncurses.LINES
        # somehow the bg defined here affects the bg in left text, if left does not define
        # a bg. The bgcolor defined of statusline is ignored in left or overriden by this
        #ftext = "#[fg=white,bg=blue] %-20s#[/end]" % [tt] # print a default
        @form.window.printstring_formatted_right @row, nil, tt, @color_pair, _attr
      end

      @repaint_required = false
    end
def repaint
      @color_pair ||= get_color($datacolor, @color, @bgcolor) 
      # earlier attrib defaulted to REVERSE which was surprising.
      _attr = @attr || Ncurses::A_NORMAL
      len = @form.window.getmaxx # width does not change upon resizing so useless, fix or do something
      len = Ncurses.COLS if len == 0 || len > Ncurses.COLS
      # this should only happen if there's a change in window
      if @row_relative
        @row = Ncurses.LINES+@row_relative
      end

      # first print dashes through
      @form.window.printstring @row, @col, "%s" % "-" * len, @color_pair, _attr

      # now call the block to get current values
      if @command
        ftext = @command.call(self, @args) 
      else
        status = $status_message ? $status_message.value : ""
        #ftext = " %-20s | %s" % [Time.now, status] # should we print a default value just in case user doesn't
        ftext = status # should we print a default value just in case user doesn't
      end
      # 2013-03-25 - 11:52 replaced $datacolor with @color_pair - how could this have been ?
      # what if user wants to change attrib ?
      if ftext =~ /#\[/
        # hopefully color_pair does not clash with formatting
        @form.window.printstring_formatted @row, @col, ftext, @color_pair, _attr
      else
        @form.window.printstring @row, @col, ftext, @color_pair, _attr
      end

      if @right_text
        ftext = @right_text.call(self, @right_args) 
        if ftext =~ /#\[/
          # hopefully color_pair does not clash with formatting
          @form.window.printstring_formatted_right @row, nil, ftext, @color_pair, _attr
        else
          c = len - ftext.length
          @form.window.printstring @row, c, ftext, @color_pair, _attr
        end
      else
        t = Time.now
        tt = t.strftime "%F %H:%M:%S"
        #r = Ncurses.LINES
        # somehow the bg defined here affects the bg in left text, if left does not define
        # a bg. The bgcolor defined of statusline is ignored in left or overriden by this
        #ftext = "#[fg=white,bg=blue] %-20s#[/end]" % [tt] # print a default
        @form.window.printstring_formatted_right @row, nil, tt, @color_pair, _attr
      end

      @repaint_required = false
    end
NOTE: I have not put a check of repaint_required, so this will print on each key-stroke OR
   rather whenever form.repaint is called.