Part two of a tutorial series on Textual's DOM query system. Covers the DOMQuery object and its list-like behavior, using first() and last() methods to retrieve specific widgets, filtering query results with filter(), excluding widgets with exclude(), and bulk-update methods like add_class(), remove(), focus(), blur(), refresh(), and set(). Includes working code examples for each concept.

6m read timeFrom blog.pythonlibrary.org
Post cover image
Table of contents
The DOMQuery ObjectGetting the First or Last WidgetQuery FiltersQuery ExclusionsOther Query MethodsWrapping UpLearn More

Sort: