I want to create a gui prompt that returns a value from input and one from a checkbox, i want this to be in the elements to be in one window. How would i go about doing that?
That's the code i have for now but it only returns one value, the input. I essentially want to add a checkbox here that also returns a value.
import wx
app = wx.App()
def prompt_name():
frame = wx.Frame(None, -1, 'win.py')
frame.SetSize(0,0,200,50)
dlg = wx.TextEntryDialog(frame, 'Enter your name', 'Prompt')
if dlg.ShowModal() == wx.ID_OK:
return dlg.GetValue()
dlg.Destroy()
print(prompt_name())
Aucun commentaire:
Enregistrer un commentaire