-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
ENH: clear() method for widgets.RadioButtons #10922
Comments
I think this is a reasonable feature request. Would it make sense to also
add such a convenience feature to the check boxes widget?
…On Fri, Mar 30, 2018 at 12:05 PM, Pradeep Reddy Raamana < ***@***.***> wrote:
Enhancement proposed
Right now, RadioButtons can be created without activating any of the
individual buttons, but they can not be cleared once created. It can be
achieved in a dirty way, by hacking properties of the associated artists.
However, I feel they need to come with a clear() method which deactivates
previously selected one - it simply has to do two things: update the button
colour and set value_selected to None. If this is acceptable, I'll be happy
to send in a PR.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10922>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AARy-DSsiPEtDn0Bv0Ux7WbRUfU82C9yks5tjlfMgaJpZM4TB2of>
.
|
that's true - I can do that as well. |
Checkboxes can at least be all unchecked individually. So there would be no definitive need for such feature as in the case of radio buttons. But since this would probably be equally easy to add, why not. |
I also would like to modify the behaviour of |
We are sticklers with regards to backwards compatibility. Yes, the name
choice wasn't great. What would be fine is to accept an optional boolean
argument that would be the state to set the checkbox to.
…On Fri, Mar 30, 2018 at 1:22 PM, Pradeep Reddy Raamana < ***@***.***> wrote:
I also would like to modify the behaviour of CheckButtons.set_active()
method - which is currently a toggle function - to reflect its name better
(sets a button regardless of its previous state). If its important to keep
the current behaviour as it reflects the mouse click behaviour, we should
rename it as toggle to reduce the cognitive overload and confusion :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10922 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-FYM4HJryLQtWQ4PcZ-i4WWV7mtYks5tjmnRgaJpZM4TB2of>
.
|
But feel free to update the docstring of the method to make this behaviour more apparent. |
Hey guys, take a look at #10924 |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
To take care of this, I've rebased the linked orphaned PR and will do a bit of cleanup as well. |
Enhancement proposed
Right now, RadioButtons can be created without activating any of the individual buttons, but they can not be cleared once created. It can be achieved in a dirty way, by hacking properties of the associated artists. However, I feel they need to come with a
clear()
method which deactivates previously selected one - it simply has to do two things: update the button colour and set value_selected to None. If this is acceptable, I'll be happy to send in a PR.The text was updated successfully, but these errors were encountered: