In MainWindow
, change this:
view = View(Item('panel'))
to this:
view = View(Item('panel', style='custom'))
See the InstanceEditor() documentation for more information. The relevant part of that document is the paragraph below the screenshot. The simple
style for an InstanceEditor
(which is the default style) creates a button that when clicked opens up a new window containing a view of the instance. The custom
style embeds the view of the instance in the same window that contains the item. The screenshot in Fig. 36 shows an example. The top of the screenshot shows the simple
style, and below that is the custom
style. (And below that are the text
and readonly
styles, but they are not very useful except perhaps for debugging.)