Skip to content

Can new items be dynamically inserted into an existing ui.menu? #4250

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

You must be logged in to vote

Hi @flintcreek,

You can move() new elements after you created them. This way you can specify the target container element as well as the target index:

with ui.column() as container:
    ui.label('first')

ui.label('second').move(container, target_index=0)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@flintcreek
Comment options

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