CPMoveNextRow Method

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

Applies to

IWPTextCursor

Declaration

function CPMoveNextRow(CreateIfNotExist: WordBool): WordBool;

Description

Move to next row in this table. If the cursor is at the end of a table, optionally a new row can be created by duplicating the current row.

 

Example:

 

    IWPMemo Memo;

    Memo = WPDLLInt1.Memo;

    IWPTextCursor TextCursor = Memo.TextCursor;

 

    // Only one row

    TextCursor.AddTable(

               "data", 3, 1, true,

               0, // EventParam =0, no event!

               false,// create header rows

               false // create footer rows

            );

    // append rows

    for (int r = 0; r < 10; r++)

           {

               // Create new row - if not in first

               if (r > 0) TextCursor.CPMoveNextRow(true);

               // and create the text

               for (int c = 0; c < 3; c++)

               {

                   TextCursor.CPTableColNr = c;

                   TextCursor.InputText("some text");

               }

           }

    TextCursor.InputParagraph(2, ""); //mode=2 --> after table!

    Memo.Reformat();

 

Category

Table Support


[idh_iwptextcursor_cpmovenextrow_.htm]    Copyright © 2007 by WPCubed GmbH