Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions easygui/boxes/choice_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,18 @@ def preselect_choice(self, preselect):

def get_choices(self):
choices_index = self.choiceboxWidget.curselection()
if not choices_index:
return None
if self.multiple_select:
selected_choices = [self.choiceboxWidget.get(index)
for index in choices_index]

if not choices_index:
selected_choices = []
else:
selected_choices = [self.choiceboxWidget.get(index)
for index in choices_index]
else:
selected_choices = self.choiceboxWidget.get(choices_index)
if not choices_index:
selected_choices = None
else:
selected_choices = self.choiceboxWidget.get(choices_index)

return selected_choices

Expand Down