Skip to content

How to set the minimum width of a NumberInput widget? #2564

Discussion options

You must be logged in to vote

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 calling my_number_input.refresh(); however, that's not an official stable API, so I'd be wary of relying on it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by selfishworm2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants