'Let user to choose settings from `Selection Dialog` specified by
:attr:`pos`.
:param pos: Index of selected item in `Configure Setting` frame.
:type pos: int
.. warning:: The value of `pos` MUST NOT be `None`.
.. seealso:: :meth:`~tui.curses_ui.CursesUI.sub_selection_dialog` in
:class:`~tui.curses_ui.CursesUI`.'

def sub_selection(self, pos):

    screen = self.sub_selection_dialog(pos)
    i_pos = self.settings[pos][1]
    id_num = range(len(self.settings[pos][2]))
    key_in = None
    while (key_in != 27):
        self.sub_selection_dialog_items(pos, i_pos, screen)
        key_in = screen.getch()
        if (key_in == curses.KEY_DOWN):
            i_pos = list((id_num[1:] + id_num[:1]))[i_pos]
        elif (key_in == curses.KEY_UP):
            i_pos = list((id_num[(-1):] + id_num[:(-1)]))[i_pos]
        elif (key_in in [10, 32]):
            if ((pos == 0) and (i_pos != self.settings[pos][1])):
                test = self.settings[pos][2][i_pos]['test_url']
                self.check_connection(test)
            self.settings[pos][1] = i_pos
            return
