Allow controlling readout width in Valid widget
See original GitHub issueThe Valid
widget does not provide a way to control the readout
style, as far as I can tell. This was originally raised in issue #1937 .
One way to do this would be to create a new ValidStyle
object for the Valid
widget that contains both the description_width
and the readout_width
fields. The ValidStyle
object should probably inherit from DescriptionStyle
.
Alternatively, we could make a new ReadoutStyle
widget, with a corresponding readout_style
traitlet on the Valid
widget. This seems a bit more extensible in the future.
For a minimal example of the current (broken) behaviour:
import ipywidgets as widgets
widget = widgets.Valid(
readout='some very very long sentence about invalidity',
layout={'width': '700px'}
)
widget
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Widget List — Jupyter Widgets 7.7.0 documentation
There are many widgets distributed with ipywidgets that are designed to display numeric values. ... The valid widget provides a read-only indicator.
Read more >3.3. Mastering widgets in the Jupyter Notebook
The @interact decorator shows a widget for controlling the arguments of a function. Here, the function f() accepts an integer as an argument....
Read more >Documentation for HAniS - the HTML5 Image AnimationS ...
The HTML5 AnimationS webapp for animating a sequence of single images on your web page, coded in JavaScript with many configuration options.
Read more >node-red-node-ui-table (node) - Node-RED - Node-RED Library
A Node-RED UI widget node which displays data as a table. ... Width: Either a number of pixels or percentage of the overall...
Read more >geemap module
fullscreenControl (bool, optional): Whether to show the control that allows the user to make the map full-screen. Defaults to True.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was just about to create an issue to request a larger
readout
width for theSelectionRangeSlider
widget but I think this issue addresses it. Looking forward to this development on what is an amazingly useful data analysis tool!For the moment it might be useful to note in the documentation the non-intuitive omission of the “readout_width” feature in the style given that there is a “description_width”: https://ipywidgets.readthedocs.io/en/latest/examples/Widget Styling.html
I spent ages looking for this feature (among various different margin settings), which I needed to improve the packing of these generously spaced slider widgets into my small screen to make them more useful, not knowing that this feature didn’t exist.