|
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 editor. 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 saying: emcTaskIssueCommand() 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. Regards Colin |
_______________________________________________ Tkinter-discuss mailing list [email protected] http://mail.python.org/mailman/listinfo/tkinter-discuss
