Merge pull request #878 from RobinD42/fix-issue875

Add missing wx.adv.EVT_CALENDAR_WEEK_CLICKED
(cherry picked from commit e1732ee271)
This commit is contained in:
Robin Dunn
2018-06-04 21:47:45 -07:00
parent 5d011f4f04
commit 9dd05ae311
4 changed files with 20 additions and 3 deletions

View File

@@ -160,6 +160,8 @@ Changes in this release include the following:
* Fixed all implementations of the PGProperty.StringToValue and IntToValue
methods to treat the value parameter as a return value. (#742)
* Add missing wx.adv.EVT_CALENDAR_WEEK_CLICKED (#875)

View File

@@ -816,7 +816,7 @@
"DirProperty":"wx.propgrid.",
"DirSelector":"wx.",
"DirSelectorPromptStr":"wx.",
"Direction":"wx.DataObject.",
"Direction":"wx.",
"DisableAsserts":"wx.",
"Display":"wx.",
"DisplayChangedEvent":"wx.",

View File

@@ -43,10 +43,11 @@ def run():
EVT_CALENDAR_SEL_CHANGED = wx.PyEventBinder( wxEVT_CALENDAR_SEL_CHANGED, 1)
EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 1)
EVT_CALENDAR_PAGE_CHANGED = wx.PyEventBinder( wxEVT_CALENDAR_PAGE_CHANGED, 1)
EVT_CALENDAR_WEEK_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEK_CLICKED, 1)
""")
# These are deprecated, get rid of them later...
module.addPyCode("""\
# These are deprecated, will be removed later...
EVT_CALENDAR_DAY = wx.PyEventBinder( wxEVT_CALENDAR_DAY_CHANGED, 1)
EVT_CALENDAR_MONTH = wx.PyEventBinder( wxEVT_CALENDAR_MONTH_CHANGED, 1)
EVT_CALENDAR_YEAR = wx.PyEventBinder( wxEVT_CALENDAR_YEAR_CHANGED, 1)

View File

@@ -66,13 +66,27 @@ class calctrl_Tests(wtc.WidgetTestCase):
def test_calevt(self):
def test_calevt1(self):
evt = wx.adv.CalendarEvent()
evt.SetDate(wx.DateTime.Today())
d = evt.PyGetDate()
assert isinstance(d, datetime.datetime)
def test_calevt2(self):
wx.adv.EVT_CALENDAR
wx.adv.EVT_CALENDAR_SEL_CHANGED
wx.adv.EVT_CALENDAR_WEEKDAY_CLICKED
wx.adv.EVT_CALENDAR_PAGE_CHANGED
wx.adv.EVT_CALENDAR_WEEK_CLICKED
wx.adv.wxEVT_CALENDAR_SEL_CHANGED
wx.adv.wxEVT_CALENDAR_PAGE_CHANGED
wx.adv.wxEVT_CALENDAR_DOUBLECLICKED
wx.adv.wxEVT_CALENDAR_WEEKDAY_CLICKED
wx.adv.wxEVT_CALENDAR_WEEK_CLICKED
#---------------------------------------------------------------------------
if __name__ == '__main__':