selectItem¶
- emlib.dialogs.selectItem(items, title='Select', entryFont=('Arial', 15), listFont=('Arial', 12), scrollbar=True, width=400, numlines=20, caseSensitive=False, ensureSelection=False, backend=None)[source]¶
Select one item from a list
- Parameters:
items (
Sequence
[str
]) – the list of optionstitle – the title of the dialog
entryFont – the font of the filter text entry (a tuple (font, size))
listFont – the font of the list (a tuple (font, size))
scrollbar – if True, add a scrollbar
width – the width in pixels
numlines – the number of lines to display at a time
caseSensitive – if True, filtering is case sensitive
ensureSelection – if True, raises a ValueError exception is no selection was done
- Return type:
Optional
[str
]- Returns:
either the selected item or None