selectItems¶
- emlib.dialogs.selectItems(items, title='Select', entryFont=('Arial', 14), listFont=('Arial', 12), scrollbar=True, width=400, numlines=20, caseSensitive=False, ensureSelection=False, backend='')[source]¶
Select one or multiple items 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
backend – if given, one of ‘qt6’, ‘qt5’, ‘tk’
- Return type:
list[str]- Returns:
a list of selected items, or an empty list if the user aborted (via Escape or closing the window)