def select_field ix0
      if ix0.is_a? Widget
        ix0 = @widgets.index(ix0)
      end
      return if @widgets.nil? or @widgets.empty?
     #$log.debug "inside select_field :  #{ix0} ai #{@active_index}" 
      f = @widgets[ix0]
      return if !f.focusable?
      if f.focusable?
        @active_index = ix0
        @row, @col = f.rowcol
        #$log.debug " WMOVE insdie sele nxt field : ROW #{@row} COL #{@col} " 
        on_enter f
        @window.wmove @row, @col # added RK FFI 2011-09-7 = setpos

        f.set_form_row # added 2011-10-5 so when embedded in another form it can get the cursor
        f.set_form_col # this can wreak havoc in containers, unless overridden

        # next line in field changes cursor position after setting form_col
        # resulting in a bug.  2011-11-25 
        # maybe it is in containers or tabbed panes and multi-containers
        # where previous objects col is still shown. we cannot do this after 
        # setformcol
        #f.curpos = 0 # why was this, okay is it because of prev obj's cursor ?
        repaint
        @window.refresh
      else
        $log.debug "inside select field ENABLED FALSE :   act #{@active_index} ix0 #{ix0}" 
      end
    end
def select_field ix0
      if ix0.is_a? Widget
        ix0 = @widgets.index(ix0)
      end
      return if @widgets.nil? or @widgets.empty?
     #$log.debug "inside select_field :  #{ix0} ai #{@active_index}" 
      f = @widgets[ix0]
      return if !f.focusable?
      if f.focusable?
        @active_index = ix0
        @row, @col = f.rowcol
        #$log.debug " WMOVE insdie sele nxt field : ROW #{@row} COL #{@col} " 
        on_enter f
        @window.wmove @row, @col # added RK FFI 2011-09-7 = setpos

        f.set_form_row # added 2011-10-5 so when embedded in another form it can get the cursor
        f.set_form_col # this can wreak havoc in containers, unless overridden

        # next line in field changes cursor position after setting form_col
        # resulting in a bug.  2011-11-25 
        # maybe it is in containers or tabbed panes and multi-containers
        # where previous objects col is still shown. we cannot do this after 
        # setformcol
        #f.curpos = 0 # why was this, okay is it because of prev obj's cursor ?
        repaint
        @window.refresh
      else
        $log.debug "inside select field ENABLED FALSE :   act #{@active_index} ix0 #{ix0}" 
      end
    end
puts focus on the given field/widget index
 @param index of field in @widgets (or can be a Widget too)
 XXX if called externally will not run a on_leave of previous field