Is it possible to extend UI.inputbox?
-
I'm assuming the answer here is to use WebDialog. However, there are only one or two things I would like to modify about the UI.inputbox and I have no javascript or DHTML experience so there would be time involved for me to ramp up on that stuff to make the WebDialog at all useful.
Perhaps some specifics are in order:
I would like to be able to modify the buttons and their functionality on an inputbox. So, instead of the standard OK and CANCEL buttons I would like to have Apply and Cancel buttons. The underlying functionality would be the same for the Cancel button, but on Apply I would simply like to perform some actions in my plugin, but allow the inputbox to remain open.
I would also like it to be non-modal so that I can select various objects in the scene (and of course fields in the input box would need to update based on the active_model's attributes
). Are things like this even possible? The docs for the UI.inputbox don't appear to suggest that they are, but I'm hoping to avoid having to use WebDialog for the time being unless absolutely necessary.
Thanks in advance for any advice/insight
-
You can't extend it. Post what you want it to look like and I'll create a webdialog for you.
Todd
-
Yeah, you're going to have to use a WebDialog to get the functionality you want. Since you're asking about UI.inputboxen, you must have already been looking through the API. WebDialogs really aren't too bad. Have a look at this article on the SketchUp API Blog.
-
Todd: I sincerely appreciate the offer but must decline for a number of reasons. Besides, what's the fun in having someone else do it for me when I now have an excuse to pick up javascript and DHTML?
This is for a propietary in-house plugin so it would also be slightly unethical for me to just take someone elses code, freely offered or not. But again, thank you for the generosity!
Jim: thanks for the link, that looks like a great place to get me started!
If I have questions along the way it seems this is a good place to ask, glad I've found it!
Advertisement