[Tkinter-discuss] Axis modification

Colin Wildsmith cwildsmith at argontechnology.com.au
Wed Feb 22 04:12:07 CET 2006

Hello all,

I am trying to modify the Axis gui for EMC2 and am having trouble
calling commands from within the 'axis.py' file.

I have modified the history widget to a small text editor and have
created some extra button widgets which I want to use to access the text

Here is a snippet of my code which is in 'axis.py', where I think the
root of my problem lies, hopefully this snippet will outline the issue
that im having beyond my explanation:


class TclCommands(nf.TclCommands):


    def edit_file(event=None):

            root_window.command = pane_top + ".tabs raise mdi" 


    def new_file(event=None):

            widgets.mdi_history.delete(1.0, END)

            root_window.command = pane_top + ".tabs raise mdi"


I have a 2 button widgets defined in 'axis.tcl' which have command
options calling the above functions, I also have short cut keys which
call these functions:


root_window.bind("<Control-e>", commands.edit_file)

root_window.bind("<Control-n>", commands.new_file)


When I press the button or use the shortcut key, the mdi tab does not
raise and I do not get any error message in the terminal. Only text




I know I can use the command options to raise the tab directly and also
use 'bind' to link the shortcut key to (pane_top + ".tabs raise mdi"),
however this limits me to one command and as you can see in the new_file
function that I would like to use two commands.







-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20060222/fd1bf719/attachment.htm 

More information about the Tkinter-discuss mailing list