Set Reset button in Inputbox SketchUp ruby


Hi All,

If any possible for creating reset button on inputbox in SketchUp ruby?

Here is my code for review,

visibles = "|Front|Left|Right"
shutters = "|Front|Right"
prompts = ["Visible Side", "Shutter", "Laminate Code"]
defaults = [vVisible, vShutter, vMaterial]
list = [visibles, shutters, materialsList]
results = UI.inputbox(prompts, defaults, list, "Visible Sides")

if you have any possibility of a set reset button on inputbox, please let me know,

Siva S


What should it do? What should it reset, and how would it look like after having reset?


please see the attached image, I want to set reset button on inputbox, if I click on the reset button, it makes all values should be empty.


Reset buttons are evil:

Also the inputbox method can’t really do anything more than you are already doing with it. It’s a super simplistic method, often not used in complex plugins.


So “Cancel” is kind of a reset.


Thanks @eneroth3, @Aerilius :slight_smile:


Hah. I knew that post had some readership, but I’m rather proud it’s being quoted as a source :wink:


If you need more control than what UI.inputbox offers then you have to look at webdialogs. There are some examples on our GitHub repositories. One of which is an example of making an inputbox like replacement: