Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

add sidebar/ dock/Form to include other ui elements #139

Open
nizartaha opened this issue Apr 28, 2022 · 0 comments
Open

add sidebar/ dock/Form to include other ui elements #139

nizartaha opened this issue Apr 28, 2022 · 0 comments

Comments

@nizartaha
Copy link

Feature Request

As a user, I would like to be able to reduce the amount of elements in the app when it starts. for example, opening a dock when a button is clicked.

Details

@viewer.button(text="open dock")
def click():
    # Open a dock or form here that contains the below elements 
    # like select, checkbox, button, etc

    @viewer.select(items=[
        {'text': '0'},
        {'text': '1'},
        {'text': '2'}
    ])
    def select(index, text):
        meshobj = meshes[text]
        viewer.view.update()

    @viewer.checkbox(text="show mesh", checked=True)
    def check(checked):
        meshobj.is_visible = checked
        viewer.view.update()

currently, all of the elements get created again when the button is clicked multiple times.
*allow to click once (or hide/show elements)

@Licini Licini mentioned this issue May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant