Python Forum
ErrorMsg using new wx.lib.agw.genericmessagedialog
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ErrorMsg using new wx.lib.agw.genericmessagedialog
#1
Here's a snippet for an error class using the wx.lib.agw.genericmessagedialog
widget in the wxPython-4.0.0b1 release.

I really like the way this widget looks.
import wx
import wx.lib.agw.genericmessagedialog as GMD


class RfcErrorMsg():
    def __init__(self, msg='This is a message', title='Hey, add a title'):
        self.dlg = GMD.GenericMessageDialog(None, msg, title,
                                       agwStyle=wx.ICON_INFORMATION | wx.OK)
        self.dlg.ShowModal()
        self.dlg.Destroy()

def main():
    app = wx.App(0)
    RfcErrorMsg(msg='RFC0008 does not have a text version', title='RFC Document Viewer')
    app.MainLoop()

if __name__ == '__main__':
    main()
Screenshot (dbl-click to view enlarged:
   
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020