Set width of forms.ask_for_string

How can i set other width to “ask_for_string” function?

I looked at this - ideally you should be able to add width=100 and that would make the window smaller (default is 500) but that is not being sent down the line correctly, at least on my machine.

exactly… i don’t know how to work around it…

Anyone have an update on this?

Hi,
The problem is that the width is hardcoded here.

You can edit the pyrevitlib\pyrevit\forms\__init__.py to set the with from kwargs as done in the lines below for other attributes, and use 400 as the default value.

If everything goes well, you could open a PR on github to fix this for everybody :wink:

1 Like