question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow controlling readout width in Valid widget

See original GitHub issue

The 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:open
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jeschwarcommented, Mar 23, 2018

I was just about to create an issue to request a larger readout width for the SelectionRangeSlider widget but I think this issue addresses it. Looking forward to this development on what is an amazingly useful data analysis tool!

1reaction
goatchurchprimecommented, Sep 11, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found