A `Widget`-derived widget with `inherit_bindings=False`, but no `BINDINGS`, appears to still inherit bindings
See original GitHub issueThis is very much related to #1343, but I think merits an issue of its own to consider first. The reasons why this happens seem clear enough, but I feel the setup may cause confusion. With Textual as it is of 0.6.0 (with the bindings for movement keys being on Widget
), consider this widget:
class Odradek( Widget, inherit_bindings=False ):
pass
vs this:
class Odradek( Widget, inherit_bindings=False ):
BINDINGS = []
In the former case the bindings of Widget
are still inherited. In the latter they’re not.
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Tkinter can higher level widget bindings be triggered in child ...
Yes, you can set things up so that events that happen on any widget will trigger a binding on a higher level widget....
Read more >TestWidgetsFlutterBinding class - flutter_test library - Dart API
Generally, one widget in the widget tree registers itself as a binding observer, and converts the system state into inherited widgets. inherited.
Read more >Modern Bindings for the Text Widget - the Tcler's Wiki!
The Text binding tag allows successive Shift-Button-1 events to change both ends of the selection, by moving the selection anchor to the end...
Read more >Dynamically Modify the Query, Initial Selection, and Widgets ...
Bindings can dynamically modify a query, set an initial filter selection, or change a widget's appearance. For example, you can change the measure...
Read more >Events and Bindings - GitHub Pages
In this example, we use the bind method of the frame widget to bind a callback function to an event called <Button-1>. Run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Much the same issue as https://github.com/Textualize/textual/pull/1336
Don’t forget to star the repository!
Follow @textualizeio for Textual updates.