Advanced Analysis Shell

At some point if you want to make plots appear within the gui, but doing so from the analysis shell, there are a few things you should know. When making plots or adding your on Tkinter code from within the 'Analysis Shell', you may get strange errors like 'blt::graph' won't make much sence. This happens if you try to create a new root Tkinter object when one already exists. The root Tkinter object can be found at 'gui.parent'. If you want to create a new 'Pop Up' style window, type the following from the 'Analysis Shell':

toplevel = Tkinter.Toplevel(master=gui.parent)

This 'toplevel' object can be passed to just about any IPlot visualization to become the parent window for that Plot or it can be used as the parent window for new Tkinter widgets.

If you want new plots or new Tkinter widgets to show up in a tab in the CompClustTk GUI, then you need to create a new page and use that variable instead of a root Tkinter object or a 'toplevel' object. Type the following to create the new 'page' object and then tell Python to automatically select this new page for you:

page = gui.notebook.add('My New Tab')
gui.notebook.selectpage('My New Tab')

If this doesn't make much sense and/or if your now interested in learning to make GUIs using Python and Tkinter, check out:

Brandon King 2005-05-27