@@ -804,8 +804,6 @@ class SelectFromList(TemplateUserInputWindow):
804
804
object attribute that should be read as item name.
805
805
multiselect (bool, optional):
806
806
allow multi-selection (uses check boxes). defaults to False
807
- exitscript (bool, optional):
808
- exit if close or nothing is returned. defaults to False
809
807
info_panel (bool, optional):
810
808
show information panel and fill with .description property of item
811
809
return_all (bool, optional):
@@ -904,9 +902,6 @@ def _setup(self, **kwargs):
904
902
self .list_lb .SelectionMode = Controls .SelectionMode .Single
905
903
self .hide_element (self .checkboxbuttons_g )
906
904
907
- # exitscript
908
- self .exitscript = kwargs .get ('exitscript' , False )
909
-
910
905
# info panel?
911
906
self .info_panel = kwargs .get ("info_panel" , False )
912
907
@@ -1187,20 +1182,28 @@ def clear_search(self, sender, args): # pylint: disable=W0613
1187
1182
self .search_tb .Focus ()
1188
1183
1189
1184
@classmethod
1190
- def show (cls , context , #pylint: disable=W0221
1191
- title = 'User Input' ,
1192
- width = DEFAULT_INPUTWINDOW_WIDTH ,
1193
- height = DEFAULT_INPUTWINDOW_HEIGHT , ** kwargs ):
1194
- """Show user input window.
1195
-
1196
- Args:
1197
- context (any): window context element(s)
1198
- """
1199
- dlg = cls (context , title , width , height , ** kwargs )
1200
- dlg .ShowDialog ()
1201
-
1202
- if dlg .exitscript and not dlg .response :
1203
- sys .exit ()
1185
+ def show (
1186
+ cls ,
1187
+ context ,
1188
+ title = 'User Input' ,
1189
+ width = DEFAULT_INPUTWINDOW_WIDTH ,
1190
+ height = DEFAULT_INPUTWINDOW_HEIGHT ,
1191
+ exitscript = False
1192
+ ** kwargs
1193
+ ):
1194
+ """Show user input window.
1195
+
1196
+ Args:
1197
+ context (any): window context element(s)
1198
+ width: ...
1199
+ height: ...
1200
+ exitscript: exit the script if the user cancels the dialog. Defaults to False
1201
+ """
1202
+ dlg = cls (context , title , width , height , ** kwargs )
1203
+ dlg .ShowDialog ()
1204
+
1205
+ if exitscript and not dlg .response :
1206
+ sys .exit ()
1204
1207
1205
1208
return dlg .response
1206
1209
0 commit comments