Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Label widget type #1190

Closed
davep opened this issue Nov 16, 2022 · 1 comment · Fixed by #1193
Closed

Add a Label widget type #1190

davep opened this issue Nov 16, 2022 · 1 comment · Fixed by #1193
Assignees
Labels
enhancement New feature or request

Comments

@davep
Copy link
Contributor

davep commented Nov 16, 2022

The need to display text on a screen is obviously common, and often Static will be used. The problem here is that if you want to select all your "labels" in a query, or style them all in a particular way, you can't just style Static as it is an ancestor of some other widgets too.

So... perhaps let's add a Label widget that simply inherits from Static to help separate out text from other forms of widgets?

@davep davep added the enhancement New feature or request label Nov 16, 2022
@davep davep self-assigned this Nov 16, 2022
davep added a commit to davep/textual that referenced this issue Nov 16, 2022
For the moment this does nothing more than inherit from a Static; but what
it does do is make it easier for someone to add text to their application
and to style it by styling all the Labels. Before now it would be common to
use a Static but if you try and style (or query) all Statics, you'd also get
things like Buttons, which inherit from Static.

See Textualize#1190
@davep davep linked a pull request Nov 16, 2022 that will close this issue
@github-actions
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant