import wx
import ctx_textctrl_notb

DATA = "I'm trying to make this work, please. Let's keep it on! " +\
                "The day is beautiful today. Together we are stronger!"

class Gui(wx.Frame):

    def __init__(self, parent):
        super().__init__(parent, title='Context sensitive TextCtrl')

        pnl = wx.Panel(self)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(
            ctx_textctrl_notb.CtxTextCtrl(pnl, 300, DATA.split()),
            0, wx.LEFT|wx.TOP, 10)
        pnl.SetSizer(hbox)
        self.Bind(wx.EVT_CLOSE, self.on_quit)
        self.Centre()
        self.Show()

    def on_quit(self, _):
        self.Destroy()

if __name__ == '__main__':
    app = wx.App()
    Gui(None)
    # from wx.lib.inspection import InspectionTool
    # InspectionTool().Show()
    app.MainLoop()
