Rich text objects in Lotus Notes and Domino
If you open up Designer Domino Release 6 file support, you will see that “what’s new in this version of the” list of 61 items in LotusScript than other areas of the Designer.
What is changing. Convert most important. Depending on the perspective of If you are an administrator. You no doubt that the system is flaky If you use the new Notes Administration Process Domino gelled collected data from different data in your organization. You will see your future in the new classes for importing and exporting data XML.
But if you’re straight – before building development for Domino users running the Notes client or web, it’s the new class for the complete text field before Notes / Domino 6 rich text box to box off the ground for developers. You can append Your software has text. But the only way. Will actually manage the content of the rich text field is a conflict with the abstract It is a plain text Notes / Domino 6 LotusScript to learn new methods and properties that allow you to separate rich text box and do Work on various objects are.
What you will use. Beginners are right or not. Could be almost anything. Just quickly before it is clear that the new text. Complete make significant changes at least three areas.
- Extract meaningful data from rich text fields
RichTextNavigator and RichTextRange let you use rich text fields as an alternative to “laundry list” applications, the kind that capture a few data points about an unlimited number of similar items (the office supplies order form used later in this article is one very simple example) by putting hundreds of fields on a form. You can collect data in a single rich text field and use the new RichTextNavigator and RichTextRange classes to parse the elements and extract data. - Add and manage new elements programmatically
New classes let you create and edit doclinks and sections as well as tables and other rich text elements. You can use simple agents to add a row to a table or a section to a field, populate it with data collected from the user or another file, compute totals, and perform maintenance. - Control the editorial style of the database
Domino has always been a great document management platform, and the new classes will make it an even better one. Notes/Domino 6 enhancements to LotusScript give you much more precise control over NotesRichTextStyle. Another new class, NotesColorObject, can be used with the rich text classes to extend the style settings to include color. You can programmatically enforce editorial appearance and transform the style of databases.
This article, the first in a series, examines the new rich text classes. We use several examples to illustrate how you can use these new classes. This article is intended for Notes/Domino application developers with LotusScript experience.
New classes, methods, and properties
There are two foundation classes for these capabilities. One is the NotesRichTextNavigator class. The other is the NotesRichTextRange class. The two of them work together.
NotesRichTextNavigator, as its name implies, assists you in navigating the contents of a rich text item or an element within an item like a table cell or a doclink. A navigator object works by representing a collection of all the elements of a particular type within the item-all the tables or all the doclinks or all the text paragraphs-and setting location pointers within the collection using methods, such as FindFirstElement, GetNextElement, GetNthElement, and more.
There is no hierarchy of subelements within a rich text field: Navigating table cells is completely separate from navigating tables, for example. If you want to limit the scope or control the location of operations, you must create a NotesRichTextRange object. If you have a rich text field that contains several tables and you want to change to contents of the cells in only one of them, you must create a range object with boundaries that begin and end with the table and then invoke the Navigator property of the range for table cells. Range properties, such as TextRun and TextParagraph, allow you to precisely navigate, read, and edit what used to be inaccessible amorphous rich text. Methods let you set beginning and end points and change the style of the text in the range, replace it, remove it, and find-and-replace, among other things.
In addition, the NotesRichTextItem class has been amplified with a dozen new methods to make it a suitable launching pad for these new classes: AppendTable, CreateNavigator, CreateRange, and others that begin and end ranges and sections and insertion points. Others give you access to information-GetNotesFont and GetUnformattedText, for instance.
Other new classes represent element types and objects: NotesRichTextTable, NotesRichTextDoclink, and NotesRichTextSection.
http://www.ibm.com/developerworks/lotus/library/ls-ND6_LSrichtext/index.html
Viewed 24788 times by 9039 viewers













