Commands 1-10: TOC, DefaultAttr

[Top]  [Chapter]  [Previous]  [Next]

Command ID: 1

Modify the width of the tables in the document. If bit 1 of parameter A is set, all tables will be modified, otherwise only the tables in the text body. Both width properties of the tables will be deleted. If bit 1 of parameter B has been set, the percentage width parameter (WPAT_BoxWidth_PC) will be set to 100%.

 

Command ID: 2

This command inserts a table of contents at the current position or the position which was marked with a merge field with the name __TOC__.

Using the parameter A you can control the way the TOC is created: bit 1: also process paragraphs in tables, bit 2: create hyperlinks, bit 3: do not use text within bookmarks but after bookmarks on the same paragraph, bit 4: do not use the TOCOutlineLevel attribute, simply collect text which is marked with bookmarks named "_Toc*", bit 5: do not create page numbers. If bit 1 is set in parameter B the text will not be formatted automatically.

 

Command ID: 3:

Asks the user to save the document if it was changed. If it was not changed or saved the result value is 1, othewise it is 0.

 

Command ID: 4:

Set the MaxParLength property to parameter A. If > 0 than the line break is fixed at this count of characters (unless the page width is smaller).

 

Command ID: 5:

Update visible cursor position. Scrolls if necessary.

 

Command ID: 6:

Reads and optionally sets the default attribute index for this text.

 

ParamA is used as bit field: 1=set the attribute index in Param B. 2=lock the default attributes, 4=unlock the default attribute.

 

 // Init default font!

 wpdllInt1.AttrHelper.Clear();

 wpdllInt1.AttrHelper.SetFontface("Courier New");

 wpdllInt1.AttrHelper.SetFontSize(12);

 wpdllInt1.Memo.TextCommand(6,3, wpdllInt1.AttrHelper.CharAttrIndex );

 

Command ID: 8:

Selects the cell the cursor is currently located within. If paramA=1 the selection will be added to the already made selection.

 

Command ID: 9 - Internally used

 

Command ID: 10 - Internally used


[commands_1_10.htm]    Copyright © 2007 by WPCubed GmbH