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.

Excessive spacing between Text objects in HBox.

See original GitHub issue

I have the following code in a cell in the Jupyter Notebook:

from ipywidgets.widgets import HBox, Text
from IPython.display import display

text1 = Text(description = "text1", width = 100)
text2 = Text(description = "text2", width = 100)
text3 = Text(description = "text3", width = 100)
text4 = Text(description = "text4", width = 100)
text5 = Text(description = "text5", width = 100)
display(HBox((text1, text2, text3, text4, text5)))

It produces the following output: image

Are the displayed Text objects supposed to be this far apart? How do I change the spacing so that they stay within the cell?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jdfredercommented, Aug 12, 2016

If I were you, I’d remove the descriptions from the text boxes and inject HTML widgets between the text boxes instead

0reactions
alexanderwhatleycommented, Aug 13, 2016

Thanks. I don’t think there’s much more to discuss, so I’ll close this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change spacing between Text objects inside HBox ...
It seems that the spacing is due to the width of the widget-text class being specified with a width of 350 pixels.
Read more >
table length set-up latex \hbox overflows - TeX
An overfull \hbox means that there is a hyphenation or justification problem: ... allowed space between words, and which makes the line go...
Read more >
HBox (JavaFX 8) - Oracle Help Center
HBox lays out its children in a single horizontal row. If the hbox has a border and/or padding set, then the contents will...
Read more >
LaTeX Spaces and Boxes
\framebox{text}, \fbox{text} enclose text into a framed box and then print. \parbox{width}{text} insert several paragraphs into a box of given width ...
Read more >
VerticalLayout and HorizontalLayout | Layout Components
The ordered layouts can have spacing between the horizontal or vertical cells. · The spacing has a default height or width, which can...
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