More test cases and handle __doc__ == None
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,23 +1,26 @@
|
|||||||
[
|
[
|
||||||
['wx', 'BitmapButton', '-1, wx.Bitmap("image.png")', ''],
|
['wx', 'BitmapButton', '-1, wx.Bitmap("image.png")', ''],
|
||||||
['wx', 'Button', '-1, "default"', 'w.SetDefault()'],
|
|
||||||
['wx', 'Button', '-1, "normal"', ''],
|
['wx', 'Button', '-1, "normal"', ''],
|
||||||
['wx', 'Button', '-1, "with a longer, longer label"', ''],
|
['wx', 'Button', '-1, "with a longer, longer label"', ''],
|
||||||
['wx', 'CheckBox', '-1, "checkbox with longer label"', ''],
|
['wx', 'Button', '-1, "default"', 'w.SetDefault()'],
|
||||||
['wx', 'CheckBox', '-1, "checkbox"', ''],
|
['wx', 'CheckBox', '-1, "checkbox"', ''],
|
||||||
|
['wx', 'CheckBox', '-1, "checkbox with longer label"', ''],
|
||||||
['wx', 'CheckListBox', '-1, size=(100,-1), choices="one two three four five six seven eight".split()', ''],
|
['wx', 'CheckListBox', '-1, size=(100,-1), choices="one two three four five six seven eight".split()', ''],
|
||||||
['wx', 'Choice', '-1, choices="one two three four five six seven eight".split()', ''],
|
['wx', 'Choice', '-1, choices="one two three four five six seven eight".split()', ''],
|
||||||
['wx', 'ComboBox', '-1, choices="one two three four five six seven eight".split(), value="default"', ''],
|
['wx', 'Choice', '-1, size=(50,-1), choices="one two three four five six seven eight".split()', ''],
|
||||||
|
['wx', 'ComboBox', '-1, value="default", choices="one two three four five six seven eight".split()', ''],
|
||||||
|
['wx', 'ComboBox', '-1, value="default", size=(75,-1), choices="one two three four five six seven eight".split()', ''],
|
||||||
|
['wx', 'ComboBox', '-1, value="read-only", style=wx.CB_READONLY, choices="one two three four five six seven eight".split()', ''],
|
||||||
['wx', 'Gauge', '-1, 100', 'w.SetValue(40)'],
|
['wx', 'Gauge', '-1, 100', 'w.SetValue(40)'],
|
||||||
['wx', 'Gauge', '-1, 100, style=wx.GA_VERTICAL', 'w.SetValue(60)'],
|
['wx', 'Gauge', '-1, 100, style=wx.GA_VERTICAL', 'w.SetValue(60)'],
|
||||||
['wx', 'ListBox', '-1, choices="one two three four five six seven eight".split()', ''],
|
['wx', 'ListBox', '-1, choices="one two three four five six seven eight".split()', ''],
|
||||||
['wx', 'ListCtrl', 'style=wx.LC_REPORT, size=(100,100)', 'w.InsertColumn(0, "Col1")\nw.InsertStringItem(0, "Item 0")\nw.InsertStringItem(0, "Item 1")\n#w.SetSizeHints((200,100))'],
|
['wx', 'ListCtrl', 'style=wx.LC_REPORT, size=(100,100)', 'w.InsertColumn(0, "Col1")\nw.InsertStringItem(0, "Item 0")\nw.InsertStringItem(0, "Item 1")\n#w.SetSizeHints((200,100))'],
|
||||||
['wx', 'Notebook', '', 'p = wx.Panel(w)\np.SetSizeHints((150,150))\nw.AddPage(p, "test")\n'],
|
['wx', 'Notebook', '', 'p = wx.Panel(w)\np.SetSizeHints((150,150))\nw.AddPage(p, "test")\n'],
|
||||||
['wx', 'Panel', 'size=(150,150)', ''],
|
['wx', 'Panel', 'size=(150,150)', ''],
|
||||||
['wx', 'RadioBox', '-1, "label", choices="one two three four five six seven eight".split(), majorDimension=2', ''],
|
['wx', 'RadioBox', '-1, "label", majorDimension=2, choices="one two three four five six seven eight".split()', ''],
|
||||||
['wx', 'RadioBox', '-1, "label", choices="one two three four five six seven eight".split(), style=wx.RA_VERTICAL, majorDimension=2', ''],
|
['wx', 'RadioBox', '-1, "label", style=wx.RA_VERTICAL, majorDimension=2, choices="one two three four five six seven eight".split()', ''],
|
||||||
['wx', 'RadioBox', '-1, "label", choices="one two three four".split()', ''],
|
['wx', 'RadioBox', '-1, "label", choices="one two three four".split()', ''],
|
||||||
['wx', 'RadioBox', '-1, "label", choices="one two three four".split(), style=wx.RA_VERTICAL', ''],
|
['wx', 'RadioBox', '-1, "label", style=wx.RA_VERTICAL, choices="one two three four".split()', ''],
|
||||||
['wx', 'RadioButton', '-1, "radio button"', ''],
|
['wx', 'RadioButton', '-1, "radio button"', ''],
|
||||||
['wx', 'ScrollBar', '', ''],
|
['wx', 'ScrollBar', '', ''],
|
||||||
['wx', 'ScrollBar', 'style=wx.SB_VERTICAL', ''],
|
['wx', 'ScrollBar', 'style=wx.SB_VERTICAL', ''],
|
||||||
@@ -46,4 +49,6 @@
|
|||||||
['wx', 'TextCtrl', '-1, "some\\ndefault text\\n", size=(200, -1), style=wx.TE_MULTILINE', 'w.AppendText("Here is some more text\\n")'],
|
['wx', 'TextCtrl', '-1, "some\\ndefault text\\n", size=(200, -1), style=wx.TE_MULTILINE', 'w.AppendText("Here is some more text\\n")'],
|
||||||
['wx', 'TreeCtrl', '', ''],
|
['wx', 'TreeCtrl', '', ''],
|
||||||
['wx.calendar', 'CalendarCtrl', '-1', ''],
|
['wx.calendar', 'CalendarCtrl', '-1', ''],
|
||||||
|
['wx.calendar', 'CalendarCtrl', '-1, style=wx.calendar.CAL_SEQUENTIAL_MONTH_SELECTION', ''],
|
||||||
|
['wx.lib.stattext', 'GenStaticText', '-1, "New font"', 'f = wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD)\rw.SetFont(f)\r'],
|
||||||
]
|
]
|
||||||
|
@@ -256,13 +256,15 @@ class LayoutTestFrame(wx.Frame):
|
|||||||
expr = "w = %s.%s( testPanel, %s )" % (moduleName, className, parameters)
|
expr = "w = %s.%s( testPanel, %s )" % (moduleName, className, parameters)
|
||||||
self.expression.SetValue(expr)
|
self.expression.SetValue(expr)
|
||||||
|
|
||||||
docstring = ""
|
docstring = None
|
||||||
try:
|
try:
|
||||||
docstring = eval("%s.%s.__init__.__doc__" % (moduleName, className))
|
docstring = eval("%s.%s.__init__.__doc__" % (moduleName, className))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
self.docstring.SetValue(docstring)
|
if docstring is not None:
|
||||||
|
self.docstring.SetValue(docstring)
|
||||||
|
else:
|
||||||
|
self.docstring.SetValue("")
|
||||||
|
|
||||||
def OnEnableDestroy(self, evt):
|
def OnEnableDestroy(self, evt):
|
||||||
evt.Enable(self.testWidget is not None)
|
evt.Enable(self.testWidget is not None)
|
||||||
|
Reference in New Issue
Block a user