@pixero said:
I've just started to learn how to make a web dialog and have some questions.
More will probably follow...
- I want to show a default value in the webdialog that the ruby script gets from SketchUp. Something like a points x, y and z coordinates. Is it possible and how do i do it?
Depends. Are you building the HTML in the ruby script, or using a canned separate file for the HTML? (It's not so much "it depends", as it is what approach you take depends on how easy any given solution is.)
@unknownuser said:
- Can you dim/deactivate/hide certain elements in a web dialog and activate them based on a checkbox state?
Yes. Standard HMTL applies. (or DHTML, or XHTML, whatever you are using). Look at DOM EVENT programming and javascript.
@unknownuser said:
- Is it possible to change some text (The description of a parameter) in a webdialog based on a checkbox state?
Yes. See 3.
@unknownuser said:
- How does "ValueChanged" work? Can I have it "executing" the script if I change a numeric value and press enter? (I don't want a OK button.)
Call me lazy to not look it up, but what is "ValueChanged"? Actually, with EVENT programming, you don't even need to press ENTER. (And, there may be a bug with pressing ENTER on either IE or Safari - and the WebDialog box will go away). You can use any event to validate, or callback to sketchup. For instance, the DOM EVENT onblur() could be used to do a callback to SketchUp when someone TABS out of an inputbox. Lots of possibilities here.
Todd


