diff --git a/demo/EditableListBox.py b/demo/EditableListBox.py index df96d407..0db17e8e 100644 --- a/demo/EditableListBox.py +++ b/demo/EditableListBox.py @@ -13,7 +13,7 @@ class TestPanel(wx.Panel): self.elb = wx.adv.EditableListBox( self, -1, "List of Stuff", (50,50), (250, 250), style=wx.adv.EL_DEFAULT_STYLE | - wx.adv.EL_NO_REORDER | + #wx.adv.EL_NO_REORDER | wx.adv.EL_ALLOW_NEW | wx.adv.EL_ALLOW_EDIT | wx.adv.EL_ALLOW_DELETE) diff --git a/demo/EventManager.py b/demo/EventManager.py index 16c0f5d4..6f0b3c3f 100644 --- a/demo/EventManager.py +++ b/demo/EventManager.py @@ -2,12 +2,13 @@ #--------------------------------------------------------------------------- # Name: EventManager.py -# Purpose: A module to demonstrate wxPython.lib.evtmgr.EventManager. +# Purpose: A module to demonstrate wx.lib.evtmgr.EventManager. # # Author: Robb Shecter (robb@acm.org) # # Created: 16-December-2002 -# Copyright: (c) 2002 by Robb Shecter (robb@acm.org) +# Copyright: (c) 2002-2016 by Robb Shecter (robb@acm.org), +# Total Control Software # Licence: wxWindows license #--------------------------------------------------------------------------- @@ -136,7 +137,7 @@ class InnerTile(wx.Window): FINAL_COLOR = wx.Colour( 20, 80,240) OFF_COLOR = wx.Colour(185,190,185) # Some pre-computation. - DELTAS = map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get()) + DELTAS = list(map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get())) START_COLOR_TUPLE = START_COLOR.Get() """ @@ -185,7 +186,8 @@ class InnerTile(wx.Window): self.makeColorFromTuple(mouseEvent.GetPosition()) - def makeColorFromTuple(self, (x, y)): + def makeColorFromTuple(self, xy): + x, y = xy MAX = 180.0 scaled = min((x + y) * self.factor, MAX) # In range [0..MAX] percent = scaled / MAX diff --git a/demo/FileCtrl.py b/demo/FileCtrl.py index 85e0e0cc..1682361e 100644 --- a/demo/FileCtrl.py +++ b/demo/FileCtrl.py @@ -18,9 +18,7 @@ class FileCtrl(wx.FileCtrl): pos=wx.DefaultPosition, size=wx.DefaultSize, name="filectrl", log=None): wx.FileCtrl.__init__(self, parent, id, defaultDirectory, defaultFilename, wildCard, style, pos, size, name) - - self.BackgroundColour = 'pink' - + self.log = log self.Bind(wx.EVT_FILECTRL_FILEACTIVATED, self.OnFileActivated) self.Bind(wx.EVT_FILECTRL_SELECTIONCHANGED, self.OnSelectionChanged) @@ -49,8 +47,12 @@ class TestPanel(wx.Panel): self.log = log wx.Panel.__init__(self, parent) - fc = FileCtrl(self, pos=(15,15), log=log) - + wx.StaticText(self, -1, + "This is a generic control with features like a file dialog", + pos=(10,10)) + fc = FileCtrl(self, pos=(10,35), log=log) + fc.SetSize((500,350)) + fc.BackgroundColour = 'sky blue' #--------------------------------------------------------------------------- diff --git a/demo/FileHistory.py b/demo/FileHistory.py index 014d4234..eb9428a5 100644 --- a/demo/FileHistory.py +++ b/demo/FileHistory.py @@ -6,12 +6,11 @@ import wx #---------------------------------------------------------------------- text = """\ -Right-click on the panel above the line to get a menu. This menu will -be managed by a FileHistory object and so the files you select will -automatically be added to the end of the menu and will be selectable -the next time the menu is viewed. The filename selected, either via the -Open menu item, or from the history, will be displayed in the log -window below. +Right-click on this panel to get a menu. This menu will be managed by a +FileHistory object and so the files you select will automatically be added to +the end of the menu and will be selectable the next time the menu is viewed. +The filename selected, either via the Open menu item, or from the history, +will be displayed in the log window below. """ #----------------------------------------------------------------------