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
Input
int
HTML dialog type
string
HTML dialog title
Specify the width of the HTML dialog in pixel.
Specify the height of the HTML dialog in pixel.
Specify whether the HTML dialog could be resizable or not.
Specify whether dialog size is remembered in registry
The name of the user defined HTML dialog class derived from HTMLDlg class.
HTMLDlg
Specify whether to show graph or image in the dialog.
Position embedded Graph/Image page.
Specify the graph or image by name.
Specify whether use the build-in JavaScript libraries: <Origin EXE folder>\JS\origin.js
Specify whether use the build-in JavaScript libraries: <Origin EXE folder>\JS\jquery-2.js
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