Skip to content

how to add widgets on events #729

Closed Answered by falkoschindler
mprosperi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mprosperi!
With NiceGUI you usually set the context for new elements using with expressions. This can be used directly when creating the containers (e.g. with ui.splitter() as splitter:), but also later to add elements to existing containers:

def add_widget():
    with splitter.after:
        ui.button('Here it is')

Replies: 1 comment 2 replies

Comment options

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

@falkoschindler
Comment options

Answer selected by mprosperi
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