To define a Web Dialog eight arguments are needed. First one is Web Dialog Name that appears in the upper left corner. If the Web Dialog has a scroll bar the boolean value is true. If the scroll bar is not needed the boolean value is false. Registry information contains the WebDialog definition informations. Width defines the width of the Web Dialog as pixels. Height determines the height of the Web Dialog as pixels. Left defines Web Dialog distance from the left of the screen as pixels. Right defines Web Dialog distance from right of the screen as pixels. If the Web Dialog is need to be resizable the boolean value is true. False if Web Dialog is not resizable. If you want to display the Web Dialog on the top, you can use the method bring_to_front.
Next example defines a new Web Dialog instance named my_thi_dialog.
my_thi_dialog = UI::WebDialog.new("Multi Actions", false, "Selection Info", 400, 300, 400, 200, true)
When WEB - dialog ( my_thi_dialog ) is being created it takes eight arguments
1. TITLE – Title of Web Dialog ( Multi Actions )
2. SCROLLABE – True : page is scrollable - False : page is not scrollable ( False )
3. PREF KEY – Registry entry information ( Selection Info )
4. WIDTH – Web Dialog width ( 400 )
5. HEIGHT – Web Dialog height ( 300 )
6. LEFT – Position from the left ( 400 Pixels )
7. TOP – Postion from the top ( 200 Pixels )
8. RESIZABLE – True : webdialog is resizable - False : webdialog is not resizable ( True )
2. Assigning WEB - page to WEB - dialog
my_thi_dialog.set_file("C:/Program Files/SketchUp/SketchUp 2017/Tools/Nextselect.html")
3. Showing Web - dialog
my_thi_dialog.show()
My_thi_dialog.set_file sets the specified file path. Web Dialog is displayed by method, dialog.show().