Issue
How to rename displayed checkboxes of ipywidgets.interact to be different from names of variables?
import ipywidgets
def print_var(_print_or_not):
if _print_or_not:
print("printed")
else:
print("don't print")
ipywidgets.interact_manual(print_var, _print_or_not=True)
I want to have a custom text as the label of the checkbox.
Edit: I don't want to change the label of the interact button, but the label of the checkbox ("_print_or_not" in this case).
Solution
This should be closed as duplicate of How do I change a button label created with 'interact_manual' from 'ipywidgets'? and how do I change the size and color of that button?
Applying the solution from that question renames the checkbox as below:
Answered By - Pete Kirkham
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.