X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8eca4fef106b8327e2e55636de3f68a511a4c392..5912d19ef7db2e64e3b4e130cbaf872a30173d1a:/wxPython/demo/ToggleButton.py

diff --git a/wxPython/demo/ToggleButton.py b/wxPython/demo/ToggleButton.py
index 74323f5103..f03dd7f4b7 100644
--- a/wxPython/demo/ToggleButton.py
+++ b/wxPython/demo/ToggleButton.py
@@ -34,10 +34,10 @@ def runTest(frame, nb, log):
         win = TestPanel(nb, log)
         return win
     else:
-        dlg = wx.MessageDialog(frame, 'wx.ToggleButton is not available on this platform.',
-                          'Sorry', wx.OK | wx.ICON_INFORMATION)
-        dlg.ShowModal()
-        dlg.Destroy()
+        from Main import MessagePanel
+        win = MessagePanel(nb, 'wx.ToggleButton is not available on this platform.',
+                           'Sorry', wx.ICON_WARNING)
+        return win
 
 
 #----------------------------------------------------------------------