At the moment, the only way to get a "tristate" appearance for a checkbutton is to manually unset the variable associated with the widget - it's impossible to get it by interacting with the widget. It would be nice if this was altered, either with
-tristate <bool>
which toggles whether clicking the checkbutton can put it into tristate mode (by unsetting the associated variable), probably the better way, or
-tristate <value>
which will toggle into tristate mode and set the variable to <value>. If -tristate isn't given, it would not be possible to click into tristate mode.
When -tristate is given, clicking the checkbutton would toggle it from on -> off -> tristate -> on -> ... etc, rather than just on -> off -> on -> ...
This would be useful for situations where something can be explicitly on, explicitly off, or ignored, for example when no input is given and the value should be checked on a parent instead.
This is easily accomplished with modified widget bindings; see attached tricycle.tcl and edit to suit. See also $TK_LIBRARY/ttk/button.tcl for reference.
Usage: [ttk::checkbutton .b -class Tricycle ...] to get a checkbutton that behaves as requested.
Yeah, I already looked at doing it by modifying the bindings. Would be nice to have it included, though (even if just by including the code you linked in ttk/button.tcl and documenting the class).
Bindings for three-state checkbutton