TkinterDnD | index ./TkinterDnD2/TkinterDnD.py

`Python wrapper for the tkDnD tk extension, which adds native drag and drop support for windows and unix systems.`

Modules
`` |  |
Tix | Tkinter |  |

Classes
`` |  | Tix.Tk(Tkinter.Tk, Tix.tixCommand) TixTk(Tix.Tk, DnDWrapper) Tkinter.Tk(Tkinter.Misc, Tkinter.Wm) Tk(Tkinter.Tk, DnDWrapper) DnDEvent DnDWrapper TixTk(Tix.Tk, DnDWrapper) Tk(Tkinter.Tk, DnDWrapper)
class DnDEvent
`` | `Internal class. Container for the properties of a drag-and-drop event.`
class DnDWrapper
`` | `Internal class.`
| Methods defined here: dnd_bind(self, sequence=None, func=None, add=None) `Bind to this widget at drag and drop event SEQUENCE a call to function FUNC. SEQUENCE may be one of the following: <<DropEnter>>, <<DropPosition>>, <<DropLeave>>, <<Drop>>, <<Drop:type>>, <<DragInitCmd>>, <<DragEndCmd>>` drag_source_register(self, button=None, *dndtypes) `This command will register SELF as a drag source. A drag source is a widget than can start a drag action. This command can be executed multiple times on a widget. When SELF is registered as a drag source, optional DNDTYPES can be provided. These DNDTYPES will be provided during a drag action, and it can contain platform independent or platform specific types. Platform independent are DND_Text for dropping text portions and DND_Files for dropping a list of files (which can contain one or multiple files) on SELF. However, these types are indicative/informative. SELF can initiate a drag action with even a different type list. Finally, button is the mouse button that will be used for starting the drag action. It can have any of the values 1 (left mouse button), 2 (middle mouse button - wheel) and 3 (right mouse button). If button is not specified, it defaults to 1.` drag_source_unregister(self) `This command will stop SELF from being a drag source. Thus, window will stop receiving events related to drag operations. It is an error to use this command for a window that has not been registered as a drag source with drag_source_register().` drop_target_register(self, *dndtypes) `This command will register SELF as a drop target. A drop target is a widget than can accept a drop action. This command can be executed multiple times on a widget. When SELF is registered as a drop target, optional DNDTYPES can be provided. These types list can contain one or more types that SELF will accept during a drop action, and it can contain platform independent or platform specific types. Platform independent are DND_Text for dropping text portions and DND_Files for dropping a list of files (which can contain one or multiple files) on SELF.` drop_target_unregister(self) `This command will stop SELF from being a drop target. Thus, SELF will stop receiving events related to drop operations. It is an error to use this command for a window that has not been registered as a drop target with drop_target_register().` get_dropfile_tempdir(self) `This command will return the temporary directory used by TkDND for storing temporary files. When the package is loaded, this temporary directory will be initialised to a proper directory according to the operating system. This default initial value can be changed to be the value of the following environmental variables: TKDND_TEMP_DIR, TEMP, TMP.` platform_independent_types(self, *dndtypes) `This command will accept a list of types that can contain platform independnent or platform specific types. A new list will be returned, where each platform specific type in DNDTYPES will be substituted by one or more platform independent types. Thus, the returned list may have more elements than DNDTYPES.` platform_specific_types(self, *dndtypes) `This command will accept a list of types that can contain platform independnent or platform specific types. A new list will be returned, where each platform independent type in DNDTYPES will be substituted by one or more platform specific types. Thus, the returned list may have more elements than DNDTYPES.` set_dropfile_tempdir(self, tempdir) `This command will change the temporary directory used by TkDND for storing temporary files to TEMPDIR.`
class TixTk(Tix.Tk, DnDWrapper)
`` | `Creates a new instance of a Tix.Tk() window; all methods of the DnDWrapper class apply to this window and all its child widgets.`
| Methods defined here: __init__(self, *args, **kw)
class Tk(Tkinter.Tk, DnDWrapper)
`` | `Creates a new instance of a Tkinter.Tk() window; all methods of the DnDWrapper class apply to this window and all its child widgets.`
| Methods defined here: __init__(self, *args, **kw)

Data
`` |  | __package__ = None