示例#1
0
def runTest(frame, nb, log):
    if wx.Platform != '__WXMAC__':
        win = TestPanel(nb, log)
        return win
    else:
        from Main import MessagePanel
        win = MessagePanel(nb, 'This demo only works on MSW and GTK.',
                           'Sorry', wx.ICON_WARNING)
        return win
示例#2
0
def runTest(frame, nb, log):
    if wx.Platform == "__WXMAC__":
        from Main import MessagePanel
        win = MessagePanel(nb, 'This demo currently fails on the Mac.',
                           'Sorry', wx.ICON_WARNING)
        return win
    else:
        win = TestPanel(nb, log)
        return win
示例#3
0
def runTest(frame, nb, log):
    try:
        win = TestPanel(nb, log)
        return win
    except NotImplementedError:
        from Main import MessagePanel
        win = MessagePanel(nb, 'wx.MediaCtrl is not available on this platform.',
                           'Sorry', wx.ICON_WARNING)
        return win
示例#4
0
def runTest(frame, nb, log):
    if wx.Platform == '__WXMSW__':
        win = TestPanel(nb, log, frame)
        return win
    else:
        from Main import MessagePanel
        win = MessagePanel(nb, 'This demo only works on Microsoft Windows.',
                           'Sorry', wx.ICON_WARNING)
        return win
示例#5
0
def runTest(frame, nb, log):
    if haveJoystick:
        win = JoystickDemoPanel(nb, log)
        return win
    else:
        from Main import MessagePanel
        win = MessagePanel(nb, 'wx.Joystick is not available on this platform.',
                           'Sorry', wx.ICON_WARNING)
        return win
示例#6
0
def runTest(frame, nb, log):
    if havePopupWindow:
        win = TestPanel(nb, log)
        return win
    else:
        from Main import MessagePanel
        win = MessagePanel(
            nb, 'wx.PopupWindow is not available on this platform.', 'Sorry',
            wx.ICON_WARNING)
        return win
示例#7
0
def runTest(frame, nb, log):
    if havePyPdf:
        win = TestPanel(nb, log)
        return win
    else:
        from Main import MessagePanel
        win = MessagePanel(
            nb, 'This demo requires the pyPdf package to be installed.\n'
            'See: http://pybrary.net/pyPdf/', 'Sorry', wx.ICON_WARNING)
        return win
示例#8
0
def runTest(frame, nb, log):
    if haveToggleBtn:
        win = TestPanel(nb, log)
        return win
    else:
        from Main import MessagePanel
        win = MessagePanel(
            nb, 'wx.ToggleButton is not available on this platform.', 'Sorry',
            wx.ICON_WARNING)
        return win
示例#9
0
def runTest(frame, nb, log):
    if have_package:
        win = TestPanel(nb, log)
        return win
    else:
        from Main import MessagePanel
        win = MessagePanel(
            nb, 'Either Python-fitz (mupdf) or PyPDF2 or pyPdf package' +
            ' must be available for this demo to run', 'Sorry',
            wx.ICON_WARNING)
        return win
示例#10
0
def runTest(frame, nb, log):
    if wx.Platform == "__WXMAC__":
        from Main import MessagePanel
        win = MessagePanel(
            nb,
            'This demo currently fails on the Mac. The problem is being looked into...',
            'Sorry', wx.ICON_WARNING)
        return win

    win = TestPanel(nb, log)
    return win
示例#11
0
def runTest(frame, nb, log):
    if wx.Platform == "__WXMAC__":
        from Main import MessagePanel
        win = MessagePanel(nb, 'This demo currently fails on the Mac. The problem is being looked into...',
                           'Sorry', wx.ICON_WARNING)
        return win

    if 1:
        win = gizmos.DynamicSashWindow(nb, -1, style =  wx.CLIP_CHILDREN
                                  #| wxDS_MANAGE_SCROLLBARS
                                  #| wxDS_DRAG_CORNER
                                  )

        win.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL))
        view = TestView(win, -1, log)
        view.SetText(sampleText)
    else:
        win = wx.DynamicSashWindow(nb, -1)
        view = SimpleView(win, -1, log)
    return win
示例#12
0
def runTest(frame, nb, log):

    try:
        import PIL.Image
        win = TestPanel(nb, log)
        return win

    except ImportError:

        from Main import MessagePanel
        win = MessagePanel(nb, 'This demo requires PIL (Python Imaging Library).',
                           'Sorry', wx.ICON_WARNING)
        return win
示例#13
0
def runTest(frame, nb, log):
    if not hadImportError:
        win = TestPanel(nb, log)
    else:
        from Main import MessagePanel
        win = MessagePanel(nb, """\
This demo requires the Numeric or numarray module,
which could not be imported.  It probably is not installed
(it's not part of the standard Python distribution). See the
Python site (http://www.python.org) for information on
downloading source or binaries.""",
                           'Sorry', wx.ICON_WARNING)
    
    return win
示例#14
0
文件: XLSGrid.py 项目: rwal127/Qube
def runTest(frame, nb, log):

    if _hasXLRD:
        win = XLSGridDemo(nb, log)
        return win
    else:
        msg = 'This demo requires the xlrd package to be installed.\n' \
              'See: http://pypi.python.org/pypi/xlrd'

        if _isStandalone:
            wx.MessageDialog(nb, msg, 'Sorry', wx.ICON_WARNING | wx.OK)
            dlg.ShowModal()
            dlg.Destroy()
        else:
            from Main import MessagePanel
            win = MessagePanel(nb, msg, 'Sorry', wx.ICON_WARNING)

        return win
示例#15
0
 def runTest(frame, nb, log):
     win = MessagePanel(
         nb, 'This demo requires the Pycairo package,\n'
         'or there is some other unmet dependency.', 'Sorry',
         wx.ICON_WARNING)
     return win