def set_menu index
      #$log.debug "set meu: #{@active_index} #{index}" 
      # first leave the existing window
      menu = @items[@active_index]
      menu.on_leave # hide its window, if open
      # now move to given menu
      @active_index = index
      menu = @items[@active_index]
      menu.on_enter #display window, if previous was displayed
      # move cursor to selected menu option on top, not inside list
      @window.wmove menu.row, menu.col
#     menu.show
#     menu.window.wrefresh # XXX we need this
    end
def set_menu index
      #$log.debug "set meu: #{@active_index} #{index}" 
      # first leave the existing window
      menu = @items[@active_index]
      menu.on_leave # hide its window, if open
      # now move to given menu
      @active_index = index
      menu = @items[@active_index]
      menu.on_enter #display window, if previous was displayed
      # move cursor to selected menu option on top, not inside list
      @window.wmove menu.row, menu.col
#     menu.show
#     menu.window.wrefresh # XXX we need this
    end
set the given menu index as the current or active menu
  after closing the active menu.
 @param Integer index of menu to activate, starting 0