How to set the minimum width of a NumberInput widget? #2564
-
How do I set the minimum width of a NumberInput widget? I added flex=1 when creating the widget, but multiple NumberInput widgets in a horizontal layout still extend beyond the screen. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The Pack style language doesn't currently have a "minimum size" constraint; you can either set a fixed width for the widget using a You might be able to work around this by manually setting |
Beta Was this translation helpful? Give feedback.
The Pack style language doesn't currently have a "minimum size" constraint; you can either set a fixed width for the widget using a
width
style, or you can allow the widget to be flexible. When flexible, it will fall back to a default minimum, which is currently set to 100px.You might be able to work around this by manually setting
my_number_input._MIN_WIDTH = <some value>
and callingmy_number_input.refresh()
; however, that's not an official stable API, so I'd be wary of relying on it.