Andereoo / TkinterWeb

Python bindings for Tkhtml.
MIT License
153 stars 16 forks source link

Emit <<Modified>> virtual events when Combobox, FileSelector or Colou… #70

Closed nickzoic closed 1 year ago

nickzoic commented 1 year ago

Emit <<Modified>> virtual events when Combobox, FileSelector or ColourSelector widgets are modified. This lets a user who wants to detect form changes (see #67) to do so by binding that virtual event.

I'd like to do the same to the other input fields too but for some reason variable.trace_add('write', callback) isn't working for me so I'll try again with validatecommand if I can work out how that works ...

Andereoo commented 1 year ago

Did you try variable.trace('write' callback)?

nickzoic commented 1 year ago

OK yeah I'm sure I did but I must have got something wrote last time because I'm sure it wasn't working. Anyway, it seems to be working now and generating event <<Modified>> for all changes.

test.py.txt