Skip to content

Accessing inline items #1095

Answered by vopani
Alex-Wenner-FHR asked this question in Q&A
Oct 28, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Without knowing the error, it's hard to know where you are facing an issue. An indexing problem would be my best guess.

A working example:

from h2o_wave import Q, main, app, ui

@app('/')
async def serve(q: Q):
    if q.args.change:
        q.page['name'].items[1].inline.items[0].message_bar.text = 'Text Change'
    else:
        q.page['name'] = ui.form_card(
            box='1 1 2 2',
            items=[
                ui.label('Test'),
                ui.inline(
                    items=[
                        ui.message_bar(type='info', text='No Filter Selected'),
                        ui.button(name='change', label='Change', primary=True)
                    ]
                )…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mtanco
Comment options

mtanco Oct 28, 2021
Collaborator

@Alex-Wenner-FHR
Comment options

@Nayananga
Comment options

@vopani
Comment options

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