I’m using a MultiChoiceDialog and I’d like for the enter key to be same as clicking OK. Can this be done?
Is there a way to find the minimum width necessary to avoid truncating strings in the list?
Does tab traversal work with dialogs? I can’t seem to tab over to the OK button.
Thanks,
R.
dlg = wx.MultiChoiceDialog(self,
“Choose files to plot”,
“File List”,
self.short_file_list,
style=wx.DEFAULT_DIALOG_STYLE |
wx.RESIZE_BORDER |
wx.OK |
wx.CANCEL |
wx.CENTRE |
wx.TAB_TRAVERSAL)
# Is there a way to find the minimum width necessary to avoid truncating strings?
size = dlg.GetSize()
Empirical adjustment to display size to show entire strings
dlg.SetSize((size[0]*1.1,size[1]*1.33))
if dlg.ShowModal() != wx.ID_OK:
dlg.Destroy()
return
R.
PGP.sig (186 Bytes)