In tkinter we have two ways to connect a callback to a widget event:
The two methods differ: with bind() the callback gets a tkinter.Event as parameter, i.e. an object with various informations on what is happened, while with command the callback gets no parameter. So tkinter suggest to write for the callbacks the signature:
If you are not familiar with tkinter events, I suggest the following documentation:
In Nictk I made these changes:
So in Nictk a callback will always receive the event parameter. His signature should be
for a non member function or
for a class member called within the class (this can be useful when subclassing a Nictk widget)
Examples of these procedures are in all example files.
Another strange behavior of tkinter is the following: when you bind an event to a widget and disable the widget the event will be ignored only if it was bound with the command option, while if it was bound with the bind() method the disabled widget will continue to respond to the event. In Nictk I changed this (since version 2.1.0), so that disabled widgets don't respond to events regardless of the method with which they were bound.