TableNext

Description

Use this function to enumerate all tables in the RichTextEdit control. Enumeration numbers are used instead of table IDs for the enumeration, because it is possible that the table IDs in the current RichTextEdit control do not reflect the sequence of tables in it.

Applies to

RichTextEdit control

Syntax

integer rtename.TableNext(integer enumerationNumber, ref integer tableID)

Argument

Description

enumerationNumber

Specifies an enumeration number. The method returns the enumeration number of the table that follows the table with this number.

If this parameter is zero, the first table's enumeration number is returned.

tableID The table ID of the next table.

Return value

Integer.

Returns the enumeration number of the next table. It can be used for the next TableNext call. The return value is zero when the last table has been reached or when the specified enumeration number was invalid.

If any argument's value is null, returns null.

Examples

This example enumerates all tables in the RichTextEdit control:

integer li_rtn,li_enum
long ll_tableid

rte_1.TableInsert(3,4)
rte_1.TableInsert(2,2,100)

//Find the first table
li_rtn = rte_1.TableNext(0,ll_tableid)
messagebox("TableNext","Next Table EnumerationNumber:" + string(li_rtn) + "~r~nFisrt Table ID:" + string(ll_tableid) )

//Find the next table
li_rtn = rte_1.TableNext(li_rtn,ll_tableid)
messagebox("TableNext","Next Table EnumerationNumber:" + string(li_rtn) + "~r~nNext Table ID:" + string(ll_tableid) )