wxpython - What does wxMessageBox return in python? -


i'm looking simple wx.messagebox return value example. i've seen basic examples , lot this. far have:

dlg = wx.messagebox( 'what choose?, 'test dialog', wx.yes_no | wx.no_default | wx.icon_question ) if dlg == wx.id_yes:     print 'you picked yes' 

dlg seems return 8 no , 2 yes. wx.id_yes = 2503 , wx.id_no = 5104

thanks time.

wx.messagebox returns 1 of wx.yes, wx.no, wx.ok, wx.cancel.

use wx.yes instead of wx.id_yes, wx.no instead of wx.id_no:

>>> import wx >>> wx.yes 2 >>> wx.no 8 

see ::wxmessagebox


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -