Updating SelectionList Selected Icon (X) to an Emoji #6027
-
I have been searching the source code and found that there is a I saw in another discussion (or issue) that someone had actually customized it so I believe it is possible. Thoughts? |
Beta Was this translation helpful? Give feedback.
Answered by
TomJGooding
Aug 7, 2025
Replies: 1 comment 2 replies
-
Here's a simple example, but using a symbol rather than emoji as it needs to change color: from textual.app import App, ComposeResult
from textual.widgets import SelectionList
from textual.widgets._toggle_button import ToggleButton
ToggleButton.BUTTON_INNER = "♥"
class ExampleApp(App[None]):
def compose(self) -> ComposeResult:
yield SelectionList[int](*((f"Selection {n}", n) for n in range(10)))
if __name__ == "__main__":
app = ExampleApp()
app.run() |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
lorddaren
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a simple example, but using a symbol rather than emoji as it needs to change color: