Fix event.Checked() calls in demo

Fixes #1652
This commit is contained in:
Scott Talbert
2020-05-28 17:33:30 -04:00
parent bda5fbefd7
commit c38e5297bf

View File

@@ -2258,7 +2258,7 @@ class wxPythonDemo(wx.Frame):
def OnToggleRedirect(self, event):
app = wx.GetApp()
if event.Checked():
if event.IsChecked():
app.RedirectStdio()
print("Print statements and other standard output will now be directed to this window.")
else:
@@ -2304,7 +2304,7 @@ class wxPythonDemo(wx.Frame):
def OnAllowAuiFloating(self, event):
self.allowAuiFloating = event.Checked()
self.allowAuiFloating = event.IsChecked()
for pane in self.mgr.GetAllPanes():
if pane.name != "Notebook":
pane.Floatable(self.allowAuiFloating)