Beiträge von ADV

    Hmm, didn't work: "ghost" images (doubled texts) were displayed.
    So, first I used WP.Memo.PaintRTFPage instead, but no change.

    Now, I set some more PaintMode flags, and now it seems to be ok.
    The paintMode flags I used are:
    wppShowMargins
    wppNoImages
    wppNoTextAtAll
    wppNoParShading
    wppNoParLines
    wppNoHeaderFooter
    wppNoWatermarks
    wppNoPageBackground

    Is this ok, or should I use any other PaintMode flags?
    Is it generally ok to use this method to display the margins?

    And again:
    Nevertheless, the "official" feature-wish from my proevious posting remains ;-)

    Regards,
    E. Hess

    Ah, WaterM3 demo.

    WPLetterhead.PaintPageOnCanvas(0,
    0, 0, 0, 0, toCanvas, [wppShowMargins],
    XRes, YRes, -1, -1, [wpNoViewPortAPI]);

    Is it ok to use function PaintPageOnCanvas (with wppShowMargins)?

    Nevertheless, the feature-wish from my proevious posting remains ;-)

    Regards,
    E. Hess

    Thank you, but I don't get it. Do you have a Demo for me?
    There are several problems which I cannot solve:
    - reflect the size and the margins of the current page
    - actual zoom mode
    - In preview window (text not editable) , I should not see this margins.

    I saw in the sources, that TWPPaintModes has the flag wppShowMargins.
    Why don't you simply made it a public flag, which can be set at TWPRichtText? Sure, we would need some more Flags for the Preview window, and and which LayoutMode to show the margins.
    Wouldn't this be a nice enhancement for the next version?

    Thank you in advance,
    E. Hess

    I got the message to disappear by:

    - converting (with BCB5's convert.exe) WpParBrd.dfm to text format
    (why are the DFMs not in text format by default?)
    - In the DFM, at cbxShading, I removed the property "ItemIndex = 0"
    - recompiling WPTools

    Then the border dialog opens without error message.
    Unfortunately cbxShading now initially has nothing selected, because - I guess - ItemIndex now is -1.

    I don't know why this works now - may be a problem between
    Delphi and BCB (5). Does anybody have the answer?

    Kind regards,
    E. Hess

    Ok, may be your answer in a previous post is it: using SuperMerge.Stack.

    Some questions:
    Does SuperMerge's Stack always point to the beginning of the band stack.
    TWPTextCombineStack members:
    What's the difference between Band and CurrentBand?
    Is CurrentGroup the group, which CurrentBand belongs to?

    Most of TWPSuperMerge's events offer the Band as parameter.
    Within such an event, is this Band the same as the Stack's CurrentBand?
    The Stack's CurrentBand is the actual band in all SuperMerge events?

    BTW: I need TWPSuperMerge's AfterProcessPage event, which does not more exist in WPTools 5.

    Thanx,
    E. Hess

    In SuperMerge's PrepareHeader event, for a certain reason I have to check the Band's property ParentGroup to determine, whether the header is a page header or whether it's a group header. Since ParentGroup does not more exists in WPTools 5, how can I find it out now?
    Same question concerning footers.

    Kind regards,
    E. Hess

    I have the following peace of WPTools 4 code (BCB 5):

    At the end of (may be it's better to do this before?) a SuperMerge generation I optionally set a new paper size (from the printer):

    if (UsePaperFromPrinter) {
    WP->PaperDefs->Init( true );
    WP->ReadPaperSizeFromPrinter();
    WP->ReformatAll( false, false );
    }

    ReadPaperSizeFromPrinter() doesn't exist anymore. How to get the same functionality with WpTools 5?

    ReformatAll got two parameters. To get the same functionality as in WPTools 4, how to set them : false/false or false/true or... ?

    Should I always call WP->Invalidate() at the end?
    Do I have to call it, even if the second parameter (RepaintMemo) of ReformatAll is true?

    Thank you in advance,
    E. Hess

    In my application using WPTools 4, I can append multiple via SuperMerge generated reports to a single destination with optional different header and footer handling.
    For this, I change SuperMerge's properties FooterOptions and HeaderOptions.

    Now, WPPTools 5 does not more offer these properties.
    What's the way in WPTools 5?

    Thank you in advance,
    E. Hess

    Hello!

    In WpTools 4 I used TWPInsertTextContents' members
    C, Band, pMergeAttr, FloatValue, IntValue and BoolValue,
    which are now missing in TWPMMInsertTextContents.

    FloatValue, IntValue and BoolValue:
    Why were they removed? Actually, I helped me converting them to a string and assigning it to StringValue.

    C:
    I guess, this is c now.

    Band:
    How can I find out, whether a band and what band is actually processed by MailMergeGetText?

    pMergeAttr:
    I guess, this is MergeAttr, but it has fundamentally changed. Can you please give me some hints where to look into the documentation to find
    something about old TAttr and new TWPStoredCharAttrInterface?

    Thank you,
    E. Hess

    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