AppendChild Method |
[Top] [Chapter] [Previous] [Next] |
Applies to Declaration function AppendChild: IntPtr; Description This procedure creates a new child paragraph. If the current paragraph is a table paragraph the child will be a table row, if it is a table row, the child will be a cell. The result value is the ID of the new paragraph. It can be used in SetPtr to be manipulated by the IWPParInterface instance.
Example: Low level table creation: IWPParInterface par= wpdllInt1.CurrPar; IntPtr tbl=par.AppendNext(); par.SetParType((int)ParagraphType.Table); for (int r= 0; r < 10; r++) { par.SetPtr(par.AppendChild()); // row=current for (int c = 0; c < 5; c++) { if (c==0) par.SetPtr(par.AppendChild()); // First Cell else par.AppendNext(); // Other cells par.AppendText((r*10+c).ToString(),-1); par.Borders = 15; } par.SetPtr(tbl); // table=current } par.AppendNext(); par.AppendText("Text after Table",-1); wpdllInt1.Reformat(); Category |