#coding: utf-8

"""
ZetCode wxPython tutorial

In this example we place a panel inside
another panel.

author: Jan Bodnar
website: www.zetcode.com
last modified: April 2018
"""


import wx


class Example(wx.Frame):

    def __init__(self, parent, title):
        super(Example, self).__init__(parent, title=title)

        self.InitUI()
        self.Centre()

    def InitUI(self):

        panel = wx.Panel(self)
        #panelの親はFrame

        panel.SetBackgroundColour('#4f5049')

        midPan = wx.Panel(panel)
        #midPanの親はpanel
        midPan.SetBackgroundColour('#ededed')

        vbox = wx.BoxSizer(wx.VERTICAL)
        #クラスBoxSizerのインスタンスvbox
        vbox.Add(midPan, wx.ID_ANY, wx.EXPAND | wx.ALL, 20)
        panel.SetSizer(vbox)


def main():

    app = wx.App()
    ex = Example(None, title='境界域')
    ex.Show()
    app.MainLoop()


if __name__ == '__main__':
    main()

	実行例