Define the width of a inputbox


is there any way to define the width of the standard inputbox via ruby?

i have some longer expressions and they are not shown in whole length in the input fields.


The .UI.inputbox(*args) ⇒ Array, false
aim is to create a simple dialog box for inputting user information, but unfortunately you do not have so much influence how it will look like. It have its own limitation and - as you discovered some small bugs…

You have to use the HtmlDialog class that allows you to create “much better” dialog boxes…


One of the bugs is that the width of the inputs are set to the widest of the prompts.

hi dan,
thanx for that info . problem easily solved :slight_smile:

extra array of prompts for the menue with a longer empty string added :slight_smile:
and voila :slight_smile:

Yeah, it’ not ideal, but it is a workaround.

We have a boiler plate example for an inputbox replacement that’s a good start: GitHub - SketchUp/htmldialog-inputbox: UI::HtmlDialog example recreating UI.inputbox functionality in the SketchUp Ruby API