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