Exemple #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
Exemple #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
Exemple #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
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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
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
Exemple #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
Exemple #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
Exemple #14
0
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
Exemple #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