def __init__(self,
                 parent,
                 id=nextWindowId(),
                 title=wx.EmptyString,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name=wx.FrameNameStr):
        '''
        Init the Frame
        Show the Frame
        '''

        if frameSizingEnabled:

            wx.Frame.__init__(self,
                              parent,
                              id=nextWindowId(),
                              title=title,
                              pos=pos,
                              size=((280 * 3) / 3, (200 * 3) / 3),
                              style=style,
                              name=name)

            # TBD - This should NOT change Frame color.
            # It should only change Panel color.
##            self.ForegroundColour = wx.COLOR_YELLOW
##            self.BackgroundColour = wx.COLOR_MAGENTA

        else:

            # Establish character and pixel position of this canvas
            # Set at top left row and column of area to be centered, by
            # default, in the user terminal screen.
            begin_y = -1
            begin_x = -1
            thePos = wx.tsGetPixelValues(begin_x, begin_y)

            # Establish character and pixel size of this canvas
            # for the wxPython application "tsWxGUI_test1.py".
            #
            # VGA Display (640 x 480 pixels) with Courier (8 x 12 pixels)
            # monospaced font characters contains (80 Cols x 40 Rows).

            # Set typical console area
            max_x = -1 # 300
            max_y = -1 # 250
            theSize = wx.tsGetPixelValues(max_x, max_y)

            wx.Frame.__init__(
                self,
                parent,
                id,
                name='Frame',
                title=title,
                pos=thePos,
                size=theSize,
                style=wx.DEFAULT_FRAME_STYLE)

        # Cannot log before GUI started via Frame.
        self.logger.debug(
            'Begin %s (0x%X).' % ('Prototype', self.tsGetTheId()))

        # The following tests depend on Showing final Frame position.
##        if splashScreenEnabled:
##            self.theSplashScreen.tsShow()
##            time.sleep(splashScreenSeconds)

##        self.myframe = wx.Frame(None, title='GridSizer')

        #-------------------------------------------------------------------
        # Begin Frame Relocation
        #-------------------------------------------------------------------

        # TBD - Menu Bar Client Area Change in Frame did not
        # reduce height of panel.
        theFrame = self
        menubar = wx.MenuBar(theFrame)
        fileMenu = wx.Menu()
        menubar.Append(fileMenu, '&File')
        self.SetMenuBar(menubar)

        self.Centre()
        self.Show()

        theRect = theFrame.Rect
        theClientArea = theFrame.ClientArea
        print('Frame: Rect=%s; ClientArea=%s' % (str(theRect),
                                                 str(theClientArea)))

        #-------------------------------------------------------------------
        # End Frame Relocation
        #-------------------------------------------------------------------

        #-------------------------------------------------------------------
        # Begin Prototype
        #-------------------------------------------------------------------

        # TBD - Menu Bar Client Area Change in Frame did not
        # reduce height of panel.

##         self.Show()

        # panel = wxPanel(
        #             parent,
        #             id=wx.ID_ANY,
        #             pos=wx.DefaultPosition,
        #             size=wx.DefaultSize,
        #             style=wx.DEFAULT_PANEL_STYLE,
        #             name=wx.PanelNameStr)

        parent = self

        print('Automatic Positioning & Sizing for expected layout.')

        boxVerticalFlag = wx.EXPAND
        boxVertical = wx.BoxSizer(wx.VERTICAL)
        boxVerticalPanel = wx.Panel(parent, wx.ID_ANY, style=wx.BORDER_SIMPLE)
        boxVerticalPanel.SetBackgroundColour("MAGENTA")
        boxVertical.Add(boxVerticalPanel, proportion=1, flag=boxVerticalFlag)
        boxVerticalPanel.SetAutoLayout(True)
        boxVerticalPanel.SetSizer(boxVertical)
        boxVerticalPanel.Layout()

        self.Show(show=True)

        nRows =  5 # 5
        nCols =  4 # 4
        vGap  =  5 # 5
        hGap  =  5 # 5
        gsFlag = wx.ALIGN_CENTER_HORIZONTAL | \
                 wx.ALIGN_CENTER_VERTICAL # wx.EXPAND
        gs = wx.GridSizer(nRows, nCols, vGap, hGap)
        gs.AddMany( [
##            (wx.Button(boxVerticalPanel, label='Cls'),   0, gsFlag),
##            (wx.Button(boxVerticalPanel, label='Bck'),   0, gsFlag),
##            (wx.StaticText(boxVerticalPanel),            0, gsFlag),
##            (wx.Button(boxVerticalPanel, label='Close'), 0, gsFlag),
            (wx.Button(boxVerticalPanel, label='7'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='8'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='9'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='/'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='4'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='5'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='6'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='*'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='1'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='2'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='3'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='-'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='0'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='.'),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='='),     0, gsFlag),
            (wx.Button(boxVerticalPanel, label='+'),     0, gsFlag) ])

        boxVertical.Add(gs, proportion=1, flag=gsFlag)
        boxVerticalPanel.SetSizer(gs)
        gs.Layout()
        theFrame.Show(show=True)

        self.Show(show=True)

        self.logger.debug(
            'End %s (0x%X).' % ('Prototype', self.tsGetTheId()))
    def __init__(self,
                 parent,
                 id=nextWindowId(),
                 title=wx.EmptyString,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name=wx.FrameNameStr):
        '''
        Init the Frame
        Show the Frame
        '''

        if frameSizingEnabled:

            wx.Frame.__init__(self,
                              parent,
                              id=nextWindowId(),
                              title=title,
                              pos=pos,
                              size=((280 * 3) / 2, (200 * 3) / 2),
                              style=style,
                              name=name)

            # TBD - This should NOT change Frame color.
            # It should only change Panel color.
##            self.ForegroundColour = wx.COLOR_YELLOW
##            self.BackgroundColour = wx.COLOR_MAGENTA

        else:

            # Establish character and pixel position of this canvas
            # Set at top left row and column of area to be centered, by
            # default, in the user terminal screen.
            begin_y = -1
            begin_x = -1
            thePos = wx.tsGetPixelValues(begin_x, begin_y)

            # Establish character and pixel size of this canvas
            # for the wxPython application "tsWxGUI_test1.py".
            #
            # VGA Display (640 x 480 pixels) with Courier (8 x 12 pixels)
            # monospaced font characters contains (80 Cols x 40 Rows).

            # Set typical console area
            max_x = -1 # 80
            max_y = -1 # 30
            theSize = wx.tsGetPixelValues(max_x, max_y)

            wx.Frame.__init__(
                self,
                parent,
                id,
                name='Frame',
                title=title,
                pos=thePos,
                size=theSize,
                style=wx.DEFAULT_FRAME_STYLE)

        # Cannot log before GUI started via Frame.
        self.logger.debug(
            'Begin %s (0x%X).' % ('Prototype', self.tsGetTheId()))

        # The following tests depend on Showing final Frame position.
##        if splashScreenEnabled:
##            self.theSplashScreen.tsShow()
##            time.sleep(splashScreenSeconds)

##        self.myframe = wx.Frame(None, title='BoxSizer')

        #-------------------------------------------------------------------
        # Begin Prototype
        #-------------------------------------------------------------------

        # TBD - Menu Bar Client Area Change in Frame did not
        # reduce height of panel.
        theFrame = self
        menubar = wx.MenuBar(theFrame)
        fileMenu = wx.Menu()
        menubar.Append(fileMenu, '&File')
        self.SetMenuBar(menubar)

        self.Centre()
        self.Show()

        theRect = theFrame.Rect
        theClientArea = theFrame.ClientArea
        print('Frame: Rect=%s; ClientArea=%s' % (str(theRect),
                                                 str(theClientArea)))

        self.TestStaticBoxSizer(theFrame)

        #-------------------------------------------------------------------
        # End Prototype
        #-------------------------------------------------------------------

        # TBD - This should NOT change Frame color.
        # It should only change Panel color.
##        self.ForegroundColour = wx.COLOR_YELLOW
##        self.BackgroundColour = wx.COLOR_MAGENTA

        self.logger.debug(
            'End %s (0x%X).' % ('Prototype', self.tsGetTheId()))
    def __init__(self,
                 parent,
                 id=nextWindowId(),
                 title=wx.EmptyString,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name=wx.FrameNameStr):
        '''
        Init the Frame
        Show the Frame
        '''

        if False and frameSizingEnabled:

            wx.Frame.__init__(self,
                              parent,
                              id=nextWindowId(),
                              title=title,
                              pos=pos,
                              size=((280 * 4) / 2, (200 * 4) / 2),
                              style=style,
                              name=name)

        else:

            # Establish character and pixel position of this canvas
            # Set at top left row and column of area to be centered, by
            # default, in the user terminal screen.
            begin_y = -1
            begin_x = -1
            thePos = wx.tsGetPixelValues(begin_x, begin_y)

            # Establish character and pixel size of this canvas
            # for the wxPython application "tsWxGUI_test1.py".
            #
            # VGA Display (640 x 480 pixels) with Courier (8 x 12 pixels)
            # monospaced font characters contains (80 Cols x 40 Rows).

            # Set typical console area
            max_x = -1 # 80
            max_y = -1 # 30
            theSize = wx.tsGetPixelValues(max_x, max_y)

            wx.Frame.__init__(
                self,
                parent,
                id,
                name='Frame',
                title=title,
                pos=thePos,
                size=theSize,
                style=wx.DEFAULT_FRAME_STYLE)

        # Cannot log before GUI started via Frame.
        self.logger.debug(
            'Begin %s (0x%X).' % ('Prototype', self.tsGetTheId()))

        #-------------------------------------------------------------------
        # Begin Prototype
        #-------------------------------------------------------------------

        # TBD - Menu Bar Client Area Change in Frame did not
        # reduce height of panel.
        theFrame = self
        menubar = wx.MenuBar(theFrame)
        fileMenu = wx.Menu()
        menubar.Append(fileMenu, '&File')
        self.SetMenuBar(menubar)

        self.Centre()
        self.Show()

        theRect = theFrame.Rect
        theClientArea = theFrame.ClientArea
        print('Frame: Rect=%s; ClientArea=%s' % (str(theRect),
                                                 str(theClientArea)))

        self.TestRadioBox(theFrame)
        self.Show()

        #-------------------------------------------------------------------
        # End Prototype
        #-------------------------------------------------------------------

        self.logger.debug(
            'End %s (0x%X).' % ('Prototype', self.tsGetTheId()))
    def __init__(self,
                 parent,
                 id=nextWindowId(),
                 title=wx.EmptyString,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name=wx.FrameNameStr):
        '''
        Init the Frame
        Show the Frame
        '''

        if frameSizingEnabled:

            wx.Frame.__init__(self,
                              parent,
                              id=nextWindowId(),
                              title=title,
                              pos=pos,
                              size=((280 * 3) / 2, (200 * 3) / 2),
                              style=style,
                              name=name)

            # TBD - This should NOT change Frame color.
            # It should only change Panel color.
##            self.ForegroundColour = wx.COLOR_YELLOW
##            self.BackgroundColour = wx.COLOR_MAGENTA

        else:

            # Establish character and pixel position of this canvas
            # Set at top left row and column of area to be centered, by
            # default, in the user terminal screen.
            begin_y = -1
            begin_x = -1
            thePos = wx.tsGetPixelValues(begin_x, begin_y)

            # Establish character and pixel size of this canvas
            # for the wxPython application "tsWxGUI_test1.py".
            #
            # VGA Display (640 x 480 pixels) with Courier (8 x 12 pixels)
            # monospaced font characters contains (80 Cols x 40 Rows).

            # Set typical console area
            max_x = -1 # 80
            max_y = -1 # 30
            theSize = wx.tsGetPixelValues(max_x, max_y)

            wx.Frame.__init__(
                self,
                parent,
                id,
                name='Frame',
                title=title,
                pos=thePos,
                size=theSize,
                style=wx.DEFAULT_FRAME_STYLE)

        # Cannot log before GUI started via Frame.
        self.logger.debug(
            'Begin %s (0x%X).' % ('Prototype', self.tsGetTheId()))

        # The following tests depend on Showing final Frame position.
##        if splashScreenEnabled:
##            self.theSplashScreen.tsShow()
##            time.sleep(splashScreenSeconds)

##        self.myframe = wx.Frame(None, title='BoxSizer')

        #-------------------------------------------------------------------
        # Begin Prototype
        #-------------------------------------------------------------------

        # TBD - Menu Bar Client Area Change in Frame did not
        # reduce height of panel.
        theFrame = self
        menubar = wx.MenuBar(theFrame)
        fileMenu = wx.Menu()
        menubar.Append(fileMenu, '&File')
        self.SetMenuBar(menubar)

        self.Centre()
        self.Show()

        theRect = theFrame.Rect
        theClientArea = theFrame.ClientArea
        print('Frame: Rect=%s; ClientArea=%s' % (str(theRect),
                                                 str(theClientArea)))

##         self.Show()

        # panel = wxPanel(
        #             parent,
        #             id=wx.ID_ANY,
        #             pos=wx.DefaultPosition,
        #             size=wx.DefaultSize,
        #             style=wx.DEFAULT_PANEL_STYLE,
        #             name=wx.PanelNameStr)

        parent = self

        print('Automatic Positioning & Sizing for expected layout.')

        boxHorizontal = wx.BoxSizer(wx.HORIZONTAL)
        panel1 = wx.Panel(parent, wx.ID_ANY, style=wx.BORDER_SIMPLE)
        panel2 = wx.Panel(parent, wx.ID_ANY, style=wx.BORDER_SIMPLE)

        panel1.SetBackgroundColour("MAGENTA")
        panel2.SetBackgroundColour("RED")

        boxHorizontal.Add(panel1, proportion=2, flag=wx.EXPAND)

        # TBD - Resolve why the following disrupt boxHorizontal display
##        boxHorizontal.AddSpacer(8)
##        boxHorizontal.AddSpacer(wx.SizerSpacer((wx.pixelWidthPerCharacter,
##                                                wx.pixelHeightPerCharacter))

        boxHorizontal.Add(panel2, proportion=1, flag=wx.EXPAND)

        self.SetAutoLayout(True)
        self.SetSizer(boxHorizontal)
        self.Layout()

        self.Show(show=True)

        boxVertical = wx.BoxSizer(wx.VERTICAL)

        panel3 = wx.Panel(panel1, wx.ID_ANY, style=wx.BORDER_SIMPLE)
        panel4 = wx.Panel(panel1, wx.ID_ANY, style=wx.BORDER_SIMPLE)
        panel5 = wx.Panel(panel1, wx.ID_ANY, style=wx.BORDER_SIMPLE)

        panel3.SetBackgroundColour("CYAN")
        panel4.SetBackgroundColour("GREEN")
        panel5.SetBackgroundColour("YELLOW")

        boxVertical.Add(panel3, proportion=1, flag=wx.EXPAND)

        boxVertical.Add(panel4, proportion=1, flag=wx.EXPAND)

        boxVertical.Add(panel5, proportion=1, flag=wx.EXPAND)

        panel1.SetAutoLayout(True)
        panel1.SetSizer(boxVertical)
        panel1.Layout()

        self.Show(show=True)

        #-------------------------------------------------------------------
        # End Prototype
        #-------------------------------------------------------------------

        # TBD - This should NOT change Frame color.
        # It should only change Panel color.
##        self.ForegroundColour = wx.COLOR_YELLOW
##        self.BackgroundColour = wx.COLOR_MAGENTA

        self.logger.debug(
            'End %s (0x%X).' % ('Prototype', self.tsGetTheId()))
    def __init__(self,
                 parent,
                 id=nextWindowId(),
                 title=wx.EmptyString,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name=wx.FrameNameStr):
        '''
        Init the Frame
        Show the Frame
        '''

        if frameSizingEnabled:

            wx.Frame.__init__(self,
                              parent,
                              id=nextWindowId(),
                              title=title,
                              pos=pos,
                              size=(40 * wx.pixelWidthPerCharacter,
				    10 * wx.pixelHeightPerCharacter),
                              style=style,
                              name=name)

            # TBD - This should NOT change Frame color.
            # It should only change Panel color.
##            self.ForegroundColour = wx.COLOR_YELLOW
##            self.BackgroundColour = wx.COLOR_MAGENTA

        else:

            # Establish character and pixel position of this canvas
            # Set at top left row and column of area to be centered, by
            # default, in the user terminal screen.
            begin_y = -1
            begin_x = -1
            thePos = wx.tsGetPixelValues(begin_x, begin_y)

            # Establish character and pixel size of this canvas
            # for the wxPython application "tsWxGUI_test1.py".
            #
            # VGA Display (640 x 480 pixels) with Courier (8 x 12 pixels)
            # monospaced font characters contains (80 Cols x 40 Rows).

            # Set typical console area
            max_x = -1 # 80
            max_y = -1 # 30
            theSize = wx.tsGetPixelValues(max_x, max_y)

            wx.Frame.__init__(
                self,
                parent,
                id,
                name='Frame',
                title=title,
                pos=thePos,
                size=theSize,
                style=wx.DEFAULT_FRAME_STYLE)

        # Cannot log before GUI started via Frame.
        self.logger.notice(
            'Begin %s (0x%X).' % ('Prototype', self.tsGetTheId()))
        print(
            'Begin %s (0x%X).' % ('Prototype', self.tsGetTheId()))

        #-------------------------------------------------------------------
        # Begin Prototype
        #-------------------------------------------------------------------

        self.Centre()
        self.Show()

        theFrame = self

        theRect = theFrame.Rect
        theClientArea = theFrame.ClientArea
        print('Frame: Rect=%s; ClientArea=%s' % (str(theRect),
                                                 str(theClientArea)))

        theText = "Hello, World! "
        print("theText=%s" % theText)

        # Allow additional width for cursor
        theTextWidth = (len(theText) + 1) * wx.pixelWidthPerCharacter
        theTextHeight = 1 * wx.pixelHeightPerCharacter

        theTextOffset = wx.Point(
            (theClientArea.x + (
                (theClientArea.width - theTextWidth) // 2)),
            (theClientArea.y + (
                (theClientArea.height - theTextHeight) // 2)))
        print("theTextOffset=%s" % str(theTextOffset))

        theTextSize = wx.Size(theTextWidth, theTextHeight)
        print("theTextSize=%s" % str(theTextSize))

        text = wx.StaticText(
            theFrame,
            pos=theTextOffset,
            size=theTextSize,
            label=theText)

        self.Show(show=True)

        #-------------------------------------------------------------------
        # End Prototype
        #-------------------------------------------------------------------

        # TBD - This should NOT change Frame color.
        # It should only change Panel color.
##        self.ForegroundColour = wx.COLOR_YELLOW
##        self.BackgroundColour = wx.COLOR_MAGENTA

        self.logger.debug(
            'End %s (0x%X).' % ('Prototype', self.tsGetTheId()))
    def __init__(self,
                 parent,
                 id=nextWindowId(),
                 title=wx.EmptyString,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name=wx.FrameNameStr):
        '''
        Init the Frame
        Get a menubar
        Get a menu for the "file" menu
        Get a menu item for "Quit"
        Bind the "Quit" menu item to the method
        Add "Quit" to the "File" menu
        Add the "File" menu to the menubar
        Get a panel to cover the Frame TBD Needed?
        Create the "Right" panel
        Create the "Left" panel
        Get a box sizer - horizontal
        Add "Left" panel to box sizer
        Add "Right" panel to box sizer
        Set box sizer as sizer for the Frame panel
        Create Status bar
        Center the Frame
        Show the Frame
        '''
        global theStatusBar

        if splashScreenEnabled:
            print('Starting CustomSplashScreen')

            bitmap = None
            splashStyle = 0
            milliseconds = 5000
            parent = None
            id = wx.ID_ANY
            pos=wx.DefaultPosition
            size=wx.DefaultSize
            style = wx.DEFAULT_SPLASHSCREEN_STYLE

            self.theSplashScreen = CustomSplashScreen(
                bitmap,
                splashStyle,
                milliseconds,
                parent,
                id,
                pos,
                size,
                style)

            self.theSplashScreen.CenterOnScreen()

            try:
                bitmapID = file('./tsLibraries/tsWxPkg/src/tsWxPython.txt',
                                'r+')
                theText = ''
                for theLine in bitmapID:
                    # print(theLine)
                    theText += theLine
                self.theSplashScreen.ts_Text.AppendText(theText)
                bitmapID.close()
            except Exception as e:
                print('bitmapID: Exception: %s' % e)

        if frameSizingEnabled:

            wx.Frame.__init__(self,
                              parent,
                              id=nextWindowId(),
                              title=title,
                              pos=pos,
                              size=(640, 300),
                              style=style,
                              name=name)

            # TBD - This should NOT change Frame color.
            # It should only change Panel color.
##            self.ForegroundColour = wx.COLOR_YELLOW
##            self.BackgroundColour = wx.COLOR_MAGENTA

        else:

            # Establish character and pixel position of this canvas
            # Set at top left row and column of area to be centered, by
            # default, in the user terminal screen.
            begin_y = -1
            begin_x = -1
            thePos = wx.tsGetPixelValues(begin_x, begin_y)

            # Establish character and pixel size of this canvas
            # for the wxPython application "tsWxGUI_test1.py".
            #
            # VGA Display (640 x 480 pixels) with Courier (8 x 12 pixels)
            # monospaced font characters contains (80 Cols x 40 Rows).

            # Set typical console area
            max_x = -1 # 80
            max_y = -1 # 30
            theSize = wx.tsGetPixelValues(max_x, max_y)

            wx.Frame.__init__(
                self,
                parent,
                id,
                name='Frame',
                title=title,
                pos=thePos,
                size=theSize,
                style=wx.DEFAULT_FRAME_STYLE)

        # Cannot log before GUI started via Frame.
        self.logger.debug(
            'Begin %s (0x%X).' % ('SCADA', self.tsGetTheId()))

        # The following tests do NOT depend on Showing final Frame position.
##        self.menuBarTest()
##        self.panelTest()
##        self.statusBarTest()
##        self.centeringTest()
##        self.scrollBarTest()
        self.DiagnosticsTest()

        # The following tests depend on Showing final Frame position.
##        if splashScreenEnabled:
##            self.theSplashScreen.tsShow()
##            time.sleep(splashScreenSeconds)

        self.Show(show=True)

        self.scada_rsm_display()
##        self.screenTest()

##        self.gaugeTest()
##        self.checkBoxTest()
##        # self.radioBoxTest()
##        self.radioButtonTest()
##        self.redirectionTest()
##        self.colorTest()
##        self.systemSettingsTest()

        # TBD - This should NOT change Frame color.
        # It should only change Panel color.
##        self.ForegroundColour = wx.COLOR_YELLOW
##        self.BackgroundColour = wx.COLOR_MAGENTA

        self.logger.debug(
            'End %s (0x%X).' % ('SCADA', self.tsGetTheId()))
    def __init__(self,
                 parent,
                 id=-1,
                 title=wx.EmptyString,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name=wx.FrameNameStr):
        '''
        Init the Frame
        Get a menubar
        Get a menu for the "file" menu
        Get a menu item for "Quit"
        Bind the "Quit" menu item to the method
        Add "Quit" to the "File" menu
        Add the "File" menu to the menubar
        Get a panel to cover the Frame TBD Needed?
        Create the "Right" panel
        Create the "Left" panel
        Get a box sizer - horizontal
        Add "Left" panel to box sizer
        Add "Right" panel to box sizer
        Set box sizer as sizer for the Frame panel
        Create Status bar
        Center the Frame
        Show the Frame
        '''
        global theStatusBar

        if frameSizingEnabled:

            wx.Frame.__init__(self,
                              parent,
                              id=-1,
                              title=title,
                              pos=pos,
                              size=(280, 200),
                              style=style,
                              name=name)

            # TBD - This should NOT change Frame color.
            # It should only change Panel color.
##            self.ForegroundColour = wx.COLOR_YELLOW
##            self.BackgroundColour = wx.COLOR_MAGENTA

        else:

            # Establish character and pixel position of this canvas
            # Set at top left row and column of area to be centered, by
            # default, in the user terminal screen.
            begin_y = -1
            begin_x = -1
            thePos = wx.tsGetPixelValues(begin_x, begin_y)

            # Establish character and pixel size of this canvas
            # for the wxPython application "tsWxGUI_test1.py".
            #
            # VGA Display (640 x 480 pixels) with Courier (8 x 12 pixels)
            # monospaced font characters contains (80 Cols x 40 Rows).

            # Set typical console area
            max_x = -1 # 80
            max_y = -1 # 30
            theSize = wx.tsGetPixelValues(max_x, max_y)

            wx.Frame.__init__(
                self,
                parent,
                id,
                name='Frame',
                title=title,
                pos=thePos,
                size=theSize,
                style=wx.DEFAULT_FRAME_STYLE)

        # Cannot log before GUI started via Frame.
        self.logger.debug(
            'Begin %s (0x%X).' % ('Communicate', self.tsGetTheId()))

        if menuBarEnabled:
            menubar = wx.MenuBar(self)

            # File menu
            theFileMenu = wx.Menu()
            item = theFileMenu.Append(
                wx.ID_ANY,
                text='&Quit\tCtrl+Q',
                help='Exit program')
    ####        self.Bind(wx.EVT_MENU, self.OnQuit, item)

            menubar.Append(theFileMenu, '&File')

            # Help menu
            theHelpMenu = wx.Menu()
            item = theHelpMenu.Append(
                wx.ID_HELP,
                text='&Help\tCtrl+?',
                help='Help for this test')
    ####        self.Bind(wx.EVT_MENU, self.OnHelp, item)

            ## this gets put in the App menu on OS-X
            item = theHelpMenu.Append(
                wx.ID_ABOUT,
                text="&About",
                help="More information About this program")
    ####        self.Bind(wx.EVT_MENU, self.OnAbout, item)
            menubar.Append(theHelpMenu, '&Help')

            self.SetMenuBar(menubar)

        if panelEnabled:

            panel = wx.Panel(self, -1)
            self.rightPanel = _RightPanel(panel, -1)

            leftPanel = _LeftPanel(panel, -1)

            hbox = wx.BoxSizer()
            hbox.Add(leftPanel, 1, wx.EXPAND | wx.ALL, 5)
            hbox.Add(self.rightPanel, 1, wx.EXPAND | wx.ALL, 5)

####        panel.SetSizer(hbox)
####        self.SetMinSize(hbox.GetMinSize())

        if statusBarEnabled:
            theStatusBarParent = self
            if statusBarTestDrive:

##            self.sb = CustomStatusBar(self, log)
##            self.SetStatusBar(self.sb)
##            tc = wx.TextCtrl(self,
##                             -1,
##                             "",
##                             style=wx.TE_READONLY|wx.TE_MULTILINE)

##            self.SetSize((640, 480))
##            self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)

                self.sb = CustomStatusBar(theStatusBarParent, None)
                self.SetStatusBar(self.sb)
                theStatusBar = self.sb
            else:
                self.CreateStatusBar()
                theStatusBar = self.GetStatusBar()
                theStatusBar.SetStatusText('Single status statement.')
            self.logger.debug(
                '  theStatusBar: %s.' % theStatusBar)

        if centerOnScreenEnabled:
            self.Centre()

        if scrollBarEnabled:
            theScrollBarParent = self
            horizontalScrollBar = wx.ScrollBar(
                theScrollBarParent,
                id=wx.ID_ANY,
                pos=wx.DefaultPosition,
                size=wx.DefaultSize,
                style=wx.SB_HORIZONTAL)
            verticalScrollBar = wx.ScrollBar(
                theScrollBarParent,
                id=wx.ID_ANY,
                pos=wx.DefaultPosition,
                size=wx.DefaultSize,
                style=wx.SB_VERTICAL)
#            scrollBar.CenterOnScreen()

        if dialogEnabled:
            dlg = wx.Dialog(
                self,
                -1,
                "Sample Dialog",
                size=(350, 200),
                #style=wx.CAPTION | wx.SYSTEM_MENU | wx.THICK_FRAME,
                style=wx.DEFAULT_DIALOG_STYLE, # & ~wx.CLOSE_BOX,
##                useMetal=useMetal,
                )
            dlg.CenterOnScreen()

        self.Show(show=True)

        baseGaugeRect = self.Rect
        if gaugeEnabled:

            # TBD - Remove temporty adjustment for smallest screens.
            if frameSizingEnabled:
                baseGaugeRect.x += 1 * wx.pixelWidthPerCharacter
                baseGaugeRect.y += 4 * wx.pixelHeightPerCharacter
            else:
                baseGaugeRect.x += 2 * wx.pixelWidthPerCharacter
                baseGaugeRect.y += 4 * wx.pixelHeightPerCharacter

            g1 = wx.Gauge(self,
                          -1,
                          range=100,
##                          pos=(110, 50),
##                          size=(250, 25),
                          pos=((baseGaugeRect.x + \
                                0 * wx.pixelWidthPerCharacter),
                               baseGaugeRect.y),
                          size=(3 * wx.pixelWidthPerCharacter,
                                9 * wx.pixelHeightPerCharacter),
                          style=wx.GA_VERTICAL | wx.BORDER_SIMPLE)
            g1.SetRange(7)
            g1.SetValue(5)

            g2 = wx.Gauge(self,
                          -1,
                          range=100,
##                          pos=(110, 50),
##                          size=(250, 25),
                          pos=((baseGaugeRect.x + \
                                3 * wx.pixelWidthPerCharacter),
                               (baseGaugeRect.y + \
                                0 * wx.pixelHeightPerCharacter)),
                          size=(29 * wx.pixelWidthPerCharacter,
                                3 * wx.pixelHeightPerCharacter),
                          style=wx.GA_HORIZONTAL | wx.BORDER_SIMPLE)
            g2.SetRange(27)
            g2.SetValue(25)

        self.Show(show=True)

        baseCheckBoxRect = baseGaugeRect
        if checkBoxEnabled:

            if frameSizingEnabled:
                baseCheckBoxRect.x += 1 * wx.pixelWidthPerCharacter
                baseCheckBoxRect.y -= 1 * wx.pixelHeightPerCharacter
            else:
                baseCheckBoxRect.x += 2 * wx.pixelWidthPerCharacter
                baseCheckBoxRect.y += 0 * wx.pixelHeightPerCharacter

##            st = wx.StaticText(self,
##                               -1,
##                               "This example demonstrates the wx.CheckBox control.",
##                               (10, 10))

            cb1 = wx.CheckBox(
                self,
                -1,
                "R-Align",
                (baseCheckBoxRect.x + 2 * wx.pixelWidthPerCharacter,
                 baseCheckBoxRect.y + 4 * wx.pixelHeightPerCharacter),
                (15 * wx.pixelWidthPerCharacter,
                 1 * wx.pixelHeightPerCharacter),
                style=wx.ALIGN_RIGHT | wx.NO_BORDER)
            cb1.SetValue(True)
 
            cb2 = wx.CheckBox(
                self,
                -1,
                "L-Align",
                (baseCheckBoxRect.x + 16 * wx.pixelWidthPerCharacter,
                 baseCheckBoxRect.y + 4 * wx.pixelHeightPerCharacter),
                (15 * wx.pixelWidthPerCharacter,
                 1 * wx.pixelHeightPerCharacter),
                style=wx.ALIGN_LEFT)

            cb3 = wx.CheckBox(
                self,
                -1,
                "Apples",
                (baseCheckBoxRect.x + 16 * wx.pixelWidthPerCharacter,
                 baseCheckBoxRect.y + 5 * wx.pixelHeightPerCharacter),
                (15 * wx.pixelWidthPerCharacter,
                 1 * wx.pixelHeightPerCharacter),
                wx.NO_BORDER)
 
            cb4 = wx.CheckBox(
                self,
                -1,
                "Oranges",
                (baseCheckBoxRect.x + 16 * wx.pixelWidthPerCharacter,
                 baseCheckBoxRect.y + 6 * wx.pixelHeightPerCharacter),
                (15 * wx.pixelWidthPerCharacter,
                 1 * wx.pixelHeightPerCharacter),
                wx.NO_BORDER)
            cb4.SetValue(True)

            cb5 = wx.CheckBox(
                self,
                -1,
                "Tristate",
                (baseCheckBoxRect.x + 2 * wx.pixelWidthPerCharacter,
                 baseCheckBoxRect.y + 7 * wx.pixelHeightPerCharacter),
                (15 * wx.pixelWidthPerCharacter,
                 1 * wx.pixelHeightPerCharacter),
                style=(wx.ALIGN_RIGHT | \
                       wx.NO_BORDER | \
                       wx.CHK_3STATE | \
                       wx.CHK_ALLOW_3RD_STATE_FOR_USER))
            cb5.Set3StateValue(2)

            cb6 = wx.CheckBox(
                self,
                -1,
                "Pears",
                (baseCheckBoxRect.x + 16 * wx.pixelWidthPerCharacter,
                 baseCheckBoxRect.y + 7 * wx.pixelHeightPerCharacter),
                (15 * wx.pixelWidthPerCharacter,
                 1 * wx.pixelHeightPerCharacter),
                wx.NO_BORDER)

        self.Show(show=True)

        if statusBarEnabled and not statusBarTestDrive:
            for i in range(5):
                msg = 'Update #%d to status.' % i
                print(msg)
                theStatusBar = self.GetStatusBar()
                theStatusBar.SetStatusText(msg)

                # TBD - Perform as part of theStatusBar.Show.
                theStatusBar._tsUpdateStatusText()
                time.sleep(1)

        # TBD - This should NOT change Frame color.
        # It should only change Panel color.
##        self.ForegroundColour = wx.COLOR_YELLOW
##        self.BackgroundColour = wx.COLOR_MAGENTA

        self.logger.debug(
            'End %s (0x%X).' % ('Communicate', self.tsGetTheId()))
    def __init__(self,
                 parent,
                 id=-1,
                 title=wx.EmptyString,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name=wx.FrameNameStr):
        '''
        Init the Frame
        Get a menubar
        Get a menu for the "file" menu
        Get a menu item for "Quit"
        Bind the "Quit" menu item to the method
        Add "Quit" to the "File" menu
        Add the "File" menu to the menubar
        Get a panel to cover the Frame TBD Needed?
        Create the "Right" panel
        Create the "Left" panel
        Get a box sizer - horizontal
        Add "Left" panel to box sizer
        Add "Right" panel to box sizer
        Set box sizer as sizer for the Frame panel
        Create Status bar
        Center the Frame
        Show the Frame
        '''
        global theStatusBar

        if frameSizingEnabled:

            wx.Frame.__init__(self,
                              parent,
                              id=-1,
                              title=title,
                              pos=pos,
                              size=(280, 200),
                              style=style,
                              name=name)

            # TBD - This should NOT change Frame color.
            # It should only change Panel color.
##            self.ForegroundColour = wx.COLOR_YELLOW
##            self.BackgroundColour = wx.COLOR_MAGENTA

        else:

            # Establish character and pixel position of this canvas
            # Set at top left row and column of area to be centered, by
            # default, in the user terminal screen.
            begin_y = -1
            begin_x = -1
            thePos = wx.tsGetPixelValues(begin_x, begin_y)

            # Establish character and pixel size of this canvas
            # for the wxPython application "tsWxGUI_test1.py".
            #
            # VGA Display (640 x 480 pixels) with Courier (8 x 12 pixels)
            # monospaced font characters contains (80 Cols x 40 Rows).

            # Set typical console area
            theSize = wx.tsGetPixelValues(80, 30)

            wx.Frame.__init__(
                self,
                parent,
                id,
                name='Frame',
                title=title,
                pos=thePos,
                size=theSize,
                style=wx.DEFAULT_FRAME_STYLE)

        # Cannot log before GUI started via Frame.
        self.logger.debug(
            'Begin %s (0x%X).' % ('Communicate', self.tsGetTheId()))

        if menuBarEnabled:
            menubar = wx.MenuBar(self)

            # File menu
            theFileMenu = wx.Menu()
            item = theFileMenu.Append(
                wx.ID_ANY,
                text='&Quit\tCtrl+Q',
                help='Exit program')
    ####        self.Bind(wx.EVT_MENU, self.OnQuit, item)

            menubar.Append(theFileMenu, '&File')

            # Help menu
            theHelpMenu = wx.Menu()
            item = theHelpMenu.Append(
                wx.ID_HELP,
                text='&Help\tCtrl+?',
                help='Help for this test')
    ####        self.Bind(wx.EVT_MENU, self.OnHelp, item)

            ## this gets put in the App menu on OS-X
            item = theHelpMenu.Append(
                wx.ID_ABOUT,
                text="&About",
                help="More information About this program")
    ####        self.Bind(wx.EVT_MENU, self.OnAbout, item)
            menubar.Append(theHelpMenu, '&Help')

            self.SetMenuBar(menubar)

        if panelEnabled:

            panel = wx.Panel(self, -1)
            self.rightPanel = _RightPanel(panel, -1)

            leftPanel = _LeftPanel(panel, -1)

            hbox = wx.BoxSizer()
            hbox.Add(leftPanel, 1, wx.EXPAND | wx.ALL, 5)
            hbox.Add(self.rightPanel, 1, wx.EXPAND | wx.ALL, 5)

####        panel.SetSizer(hbox)
####        self.SetMinSize(hbox.GetMinSize())

        if statusBarEnabled:
            theStatusBarParent = self

##            self.sb = CustomStatusBar(self, log)
##            self.SetStatusBar(self.sb)
##            tc = wx.TextCtrl(self,
##                             -1,
##                             "",
##                             style=wx.TE_READONLY|wx.TE_MULTILINE)

##            self.SetSize((640, 480))
##            self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)

            self.sb = CustomStatusBar(theStatusBarParent, None)
            self.SetStatusBar(self.sb)
            if statusBarTestDrive:
                theStatusBar = self.sb
                self.logger.debug(
                    '  theStatusBar: %s.' % theStatusBar)

        if centerOnScreenEnabled:
            self.Centre()

        self.Show(show=True)
        # TBD - This should NOT change Frame color.
        # It should only change Panel color.
##        self.ForegroundColour = wx.COLOR_YELLOW
##        self.BackgroundColour = wx.COLOR_MAGENTA

        self.logger.debug(
            'End %s (0x%X).' % ('Communicate', self.tsGetTheId()))