Skip to content

Is it possible to catch the text of a checkbox? #357

Closed Answered by rodja
sprogus asked this question in Q&A
Discussion options

You must be logged in to vote

The ValueChangeEventArguments contain the sender and the value:

from nicegui import ui, events

async def check(event: events.ValueChangeEventArguments):
    event.sender.set_text('Checked' if event.value else '')

ui.checkbox(value=False, on_change=check)

ui.run()

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sprogus
Comment options

@rodja
Comment options

Answer selected by rodja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants