WPAT codes and tables

  • Hi,

    I'm trying to produce some table propery dialogs that replicate (in part) the word properties dialog, but I am finding it extremely difficult! Numerous problems. I have managed to resolve 2 items, but only after an age of trial and error.

    I want to be able to
    Wrap text round the table
    Set the padding for left, right, top and bottom
    Deal with alignment of text within cells
    etc.

    And I would like to do all this by table, row, cell etc

    I can see that the WPAT codes would appear to hold the key to this and I keep trying various options and various forms of TParagraph, but I get nowehere.

    I have worked out how to set the padding. However, I have noticed that if you set the left padding, it pushes the text across the border of the column to the right. If I set the right padding it appears to be almost twice the size of what you would expect it to be.

    Also, if you set the padding of a particular cell, then insert a table into that cell, the new table adopts the padding properties of the cell. I have tried adding code to reset the padding properties for the new inner table, but it does not seem to do anything.

    I have searched through the help file, the pdf upgraders docs, the source, the samples and I can find no guidance on how to do this stuff.

    Help please.

    I am having problems with padding[/list]

    • Offizieller Beitrag

    Hi,

    Zitat

    I want to be able to Wrap text round the table


    WPTools 5 does not do this.

    Zitat

    Set the padding for left, right, top and bottom
    Deal with alignment of text within cells
    etc.


    For padding use the spacebefore,fetre and left and right indents. Alignment for cells is WPAT_ParAling

    Zitat

    And I would like to do all this by table, row, cell etc

    I can see that the WPAT codes would appear to hold the key to this and I keep trying various options and various forms of TParagraph, but I get nowehere.


    Such a dialog is not an easy task - othewise it would not be on the lsit for next major version. Currently you are best of to work with selections.

    Zitat

    I have worked out how to set the padding. However, I have noticed that if you set the left padding, it pushes the text across the border of the column to the right. If I set the right padding it appears to be almost twice the size of what you would expect it to be.

    You need to use the indents, not padding.

    Zitat

    Also, if you set the padding of a particular cell, then insert a table into that cell, the new table adopts the padding properties of the cell. I have tried adding code to reset the padding properties for the new inner table, but it does not seem to do anything.

    I have searched through the help file, the pdf upgraders docs, the source, the samples and I can find no guidance on how to do this stuff.

    You cannot - the Current format routine is optmizied for text loaded from RTF.