Hello!
While SuperMerge is running, at the location of a special field
I want to dynamically create a table in SuperMerge's Destination-RichtText.
For this, I use the second example of the documentation.
In short - you remember:
AddTable()
CPMoveBack()
Loop:
TableRowNumber = r
TableColNumber = c;
InputString()
Now I have some problems/questions:
1. After having created the table, how can I place the cursor
to the line behind the table? I know, using SuperMerge, I could
set it to the end of the Destination-RichText (CPosition = MaxInt).
But I could also use my table creation procedure with a RichText,
that has text behind my table.
2. After having created the table with AddTable(), I fill it row by row.
The first 3 rows are headers, where with the very first I want
to "group" some headers. This means, when filling this header row
cell by cell from left to right, I check, whether the previous
header has the same name. In this case I want to combine these
cells. The 3rd and 4th... header may also be combined.
I tried various things with CombineCells() and SelectCells(),
but they didn't work (resutls were chaotic). Also I tried to
check my next header (not the previous) - helped not.
Unfortunately, the help file is very short in the description of
CombineCells() and SelectCells(). Also I wonder, why there is no
Function SelectCells( FromCol, FromRow, ToRow, ToCol ).
In the WordProcessor demo, selecting cells manually and then
combine them, works greatly.
But what do I have to do, to make this programatically. Perhaps
I have to place the cursor into the cells, then make the selection -
but how to do this?
3. Since the columns have certain widths, to avoid adding an invisible
dummy column, which gets the resting width, I read something about
setting the MarginRight of a table.
But how can I set the margin for a table, the already exists?
4. I have to choose an appropriate column width depending on the cells'
contents. How can I calculate the width of the text, before I
insert it via InputString()? Sure, this depends on the font, that
is used in a cell.
What could be the solution to my problem?
All people are welcome to give my tips.
Thanx in advance,
E. Hess