3.7.5.44 Note

LabTalk Object Type:

Utility

The note object has properties to provide access to the active Notes window. The object properties can be accessed using the following syntax:

note.property

To create a Notes window, refer to the window command.

To see details about how to edit HTML in Notes window, refer to Notes window document.

Properties:

Property Access Description
note.text$ Read/write,
string

Get/set the text of the active Notes window.

note.phsheet$ Read/write,
string

Get/set placeholder sheets of the active Note window

note.readonly Read/write,
numeric

Switch between read-only mode and editable mode. Only work if note.view = 0.

  • 0 = Editable mode (default)
  • 1 = Read-Only mode.
note.syntax Read/write,
numeric

Switch to colored HTML syntax.

  • 0 = plain text (default),
  • 1 = colored HTML syntax
  • 2 = Markdown syntax
note.view Read/write,
numeric

Switch between Text Mode and Render Mode.

  • 0 = text editor (default),
  • 1 = render with HTML browser.
note.ExportHTML() Write,
string

Export to the active Note window to a HTML webpage.

note.Load() Write,
string

Load the specified html file to the active Note window.

note.Close() --

Close the active Note window.

note.Duplicate() --

Duplicate the active Note window.

Examples:

window -n n Sample;    //Create a Notes window named "Sample"
note.text$=
<html>
<body>
	<h1>Hello World</h1>
	<p>This is a very basic example of inserting two Link Field Codes into an HTML page.<p>
	<p><em>Note: If you modify the graph or save the project and are in HTML view mode, hit <strong>F5</strong> to refresh the HTML page.</em></p>
	<!-- Observe that only width is specified. Browser will set the height automatically-->
	<img alt="{{graph://Graph1}}" width="500">
</body>
</html>;
//Set text content 

note.view = 1;   //Render with HTML browser

note.ExportHTML(D:\Sample.html);// export the Note window to the html file.
window -n n NewNote //Create a Notes window named "NewNote"
string htmlfile$=system.path.program$+"\Samples\HTML\Hello World.html";
note.Load(htmlfile$) // load a html file in the active note window.