-
Notifications
You must be signed in to change notification settings - Fork 949
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
Togglebuttons with only Icons #2209
Comments
You should be able to create buttons with only icons.
That should work. |
I'm afraid that doesn't work, or should not work, as the documentation says:
I think we should not require unique labels though, is there any reason for it? |
I changed #2182 to allow non-unique labels. |
I was trying to achieve the same thing right now, TogglesButtons with only icons.
I totally agree with you. It feels wrong to me. Actually, I feel like values should be unique, not labels. Right now nothing stops you from creating a ToggleButtons(options=[('first', ''), ('second', '')]) And this totally breaks the selection, both in the GUI and from Python. I suppose a proper
ToggleButtons(options=[('', 0), ('', 1)], icons=['home', 'arrow-left'])
ToggleButtons(options=[('first', ''), ('second', '')]) # Broken
|
Any update on ToggleButtons with only icons? Although the following code can create ToggleButtons with only icons, the buttons are not responding to mouse-clicking properly, as the labels are non-unique.
|
@maread99 Thanks for providing this workaround. It works. |
Smart :) don't forget https://github.com/mariobuikhuizen/ipyvuetify |
@maartenbreddels Wow, ipyvuetify looks fantastic. I need to try it out. Thanks. |
While @maread99 's suggestions is a good workaround, it seems the description is still kind of there when I make the buttons very narrow: ipw.ToggleButtons(options = [('', 0), (' ', 1), (' ', 2)], value=1,
icons=['refresh', 'close', 'arrow-up'],
style=ipw.ToggleButtonsStyle(button_width='15px')) It shows up as little dots (for some reason, the Is it possible to hide the description alltogether? |
I have a togglebuttons related question.
When I am created togglebuttons, would it be possible to create several buttons without name? In that case, only the icons are used to show the button.
Also, for the togglebuttons, does it support removing one of it or add another toggle button to it?
Thanks
The text was updated successfully, but these errors were encountered: