Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled for pn.WidgetBox #502

Closed
ahuang11 opened this issue Jul 5, 2019 · 3 comments
Closed

Disabled for pn.WidgetBox #502

ahuang11 opened this issue Jul 5, 2019 · 3 comments
Labels
good first issue Good for newcomers sprintable type: enhancement Minor feature or improvement to an existing feature
Milestone

Comments

@ahuang11
Copy link
Contributor

ahuang11 commented Jul 5, 2019

Would be nice to be able to set disabled=True on all the widgets inside a WidgetBox

pn.WidgetBox.disabled = True

@philippjfr
Copy link
Member

Neat idea. Happy to accept a PR for that, basically you'd define something like:

@param.depends('disabled', watch=True)
def _disable_widgets(self):
    for obj in self:
        if isinstance(obj, Widget):
            obj.disabled = self.disabled

additionally any methods that allow adding a new widget or replacing an existing one would have to toggle the disabled state.

@philippjfr philippjfr added good first issue Good for newcomers type: enhancement Minor feature or improvement to an existing feature labels Jul 9, 2019
@gwbischof
Copy link
Contributor

Should all Layouts have a disabled property and not just WidgetBox?

@philippjfr
Copy link
Member

Should all Layouts have a disabled property and not just WidgetBox?

I'd prefer not to, WidgetBox is clearly meant for widgets an option that's a no-op for most contents of a Row/Column doesn't seem good to me.

@philippjfr philippjfr added this to the v0.7.0 milestone Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers sprintable type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants