Create an HTML dialog
Minimum Origin Version Required: Origin 2017 SR2
1. newHTML;
2. newHTML -dp; \\ use Code Builder's frame as HTML dialog parent.
3. newHTML title:=MyExample cname:=MyEx opj:=0;
4. newHTML resize:=1 dlgw:=500 dlgh:=500;
5. newHTML dlgtype:=1 title:=MyGraphExample cname:=MyGrphEx opj:=1 pgshow:=1 pgname:=MyGraph;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Type | dlgtype |
Input int |
|
HTML dialog type
|
Dialog Title | title |
Input string |
|
HTML dialog title |
Width | dlgw |
Input int |
|
Specify the width of the HTML dialog in pixel. |
Height | dlgh |
Input int |
|
Specify the height of the HTML dialog in pixel. |
Resizable | resize |
Input int |
|
Specify whether the HTML dialog could be resizable or not. |
Save position and size | savesz |
Input int |
|
Specify whether dialog size is remembered in registry |
Origin C Class Name | cname |
Input string |
|
The name of the user defined HTML dialog class derived from |
Show | pgshow |
Input int |
|
Specify whether to show graph or image in the dialog.
|
Page Position | pgpos |
Input int |
|
Position embedded Graph/Image page.
|
Page Name | pgname |
Input string |
|
Specify the graph or image by name. |
Origin | ojs |
Input int |
|
Specify whether use the build-in JavaScript libraries: <Origin EXE folder>\JS\origin.js |
jQuery | jquery |
Input int |
|
Specify whether use the build-in JavaScript libraries: <Origin EXE folder>\JS\jquery-2.js |
Write files in project path | opj |
Input int |
|
Specify whether to write the HTML file and the CPP file in project path.
if(run.LoadOC("%X\name.cpp", 16) == 0) OpenNameDlg; //this is the function to open the HTML dialog else type "Failed to load %X\name.cpp!";
|
This X-Function can help you create an HTML dialog easily and quickly. It provides some basic options to design your HTML dialog.
For detail about HTML dialog, see these tutorials.
newHTML –d
in Script Window and then hit ENTER to bright up the X-Function dialog.