libtextworker 0.1.4
Cross-platform, free and open library for Python projects
|
A file system events handler derived from watchdog's FileSystemEventHandler. On both wx and Tk, a new event will be generated. Set the Target attribute which the handler sends the event to. On Tk, since a new event is just a new event: no custom value allowed. However you can do a bind_class to connect the event to all widgets with your specified class: ```python # Binds FileDeletedEvent to all StyledTextControl instances root.bind_class('StyledTextControl', FileDeletedEvent, callback) # Or this (add=True won't replace the current callback if any) widget.bind(FileDeletedEvent, callback, add=True) ``` Or, if you use this for your own widget, derive this class like any other classes you use for that widget, and set TargetIsSelf = True instead of Target. This class does not use __init__. Currently only one target is supported. You need to do something else to handle the events generated here.
Definition at line 37 of file dirctrl.py.