Additional Widget Option '-transitionmode'

Command-Line Name: -transitionmode
Database Name: transitionMode
Database Class: TransitionMode

Per default (mode none) an Enter/Leave event triggers for a tag when the mouse first becomes hovering a region of characters associated by this tag, or when leaving a region of characters associated by this tag. It may be desired to receive a Leave/Enter pair if the mouse pointer is changing the display line even without leaving such a region, this can be accomplished with transition mode displayline.

Try the following example:

The highlighting works fine when hovering the words from left to right, or vice versa. But when hovering from top to bottom, or vice versa, the highlighting does not work. At the first glance this seems to be unexpected, but in fact this behavior is correct, because the Enter/Leave event cannot be triggered when moving the mouse pointer from top to bottom, because the associated tag does not change. Now uncomment the second line in this script, this mode is forcing a Leave/Enter event when the display line will change, and the script will work as expected.

It is useful if this behavior can be specified tag wise:

-transitionmode code

This tag option overrules the global option -transitionmode when set. If this mode is set to none then an Enter/Leave event triggers for this tag when the mouse first becomes hovering a region of characters associated by this tag, or when leaving a region of characters associated by this tag. It may be desired to receive a Leave/Enter pair if the mouse pointer is changing the display line even without leaving such a region, this can be accomplished with transition mode displayline.