Merge pull request #839 from swt2c/add_numdlg

Add missing wx.NumberEntryDialog
This commit is contained in:
Robin Dunn
2018-05-01 20:22:19 -07:00
parent f1d9c2579c
commit 7e248fca3e
5 changed files with 16 additions and 6 deletions

View File

@@ -105,13 +105,14 @@ Changes in this release include the following:
* Ensure that the page exists in book controls GetPage and RemovePage methods.
At least one of the wx ports do not do this. (#830)
* Added missing wx.NumberEntryDialog
* Change wx.TextCompleterSimple.GetCompletions to send the list of strings
as a return value, rather than a parameter that gets filled. (#836)
4.0.1 "Lemonade"
----------------
* 2-Feb-2018

View File

@@ -336,7 +336,6 @@ NotebookEvent :class:`wx.BookCtrl
NotebookPage ``MISSING``
NotificationMessage :class:`wx.adv.NotificationMessage`
NullFileTypeInfo ``MISSING``
NumberEntryDialog ``MISSING``
Panel_GetClassDefaultAttributes :meth:`wx.Panel.GetClassDefaultAttributes <Window.GetClassDefaultAttributes>`
PCXHandler ``MISSING``
PlatformInformation_GetOperatingSystemDirectory :meth:`wx.PlatformInfo.GetOperatingSystemDirectory`

View File

@@ -2402,6 +2402,7 @@
"NullPalette":"wx.",
"NullPen":"wx.",
"NullRegion":"wx.",
"NumberEntryDialog":"wx.",
"NumericPropertyValidator":"wx.propgrid.",
"NumericType":"wx.propgrid.NumericPropertyValidator.",
"ODCB_DCLICK_CYCLES":"wx.adv.",

View File

@@ -17,8 +17,7 @@ DOCSTRING = ""
# The classes and/or the basename of the Doxygen XML files to be processed by
# this script.
ITEMS = [ 'numdlg_8h.xml',
ITEMS = [ 'wxNumberEntryDialog',
]
#---------------------------------------------------------------------------
@@ -34,6 +33,9 @@ def run():
module.addHeaderCode('#include <wx/numdlg.h>')
c = module.find('wxNumberEntryDialog')
tools.fixTopLevelWindowClass(c)
c = module.find('wxGetNumberFromUser')
c.mustHaveApp()

View File

@@ -6,9 +6,16 @@ import wx
class numdlg_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_numdlg1(self):
self.fail("Unit tests for numdlg not implemented yet.")
dlg = wx.NumberEntryDialog(None, "Message", "Prompt", "Caption", 50, 0, 100)
wx.CallLater(250, dlg.EndModal, wx.ID_OK)
dlg.ShowModal()
self.assertEqual(dlg.GetValue(), 50)
dlg.Destroy()
def test_numdlg2(self):
# Ideally we would call this but don't know how to dismiss the dialog
wx.GetNumberFromUser
#---------------------------------------------------------------------------