Beiträge von ADV

    Hello!

    Unfortunately the philosophie and conzept of codepage and charset handling in WPTools is not documented, so i don't find my informations. So, here are my questions:

    I want to switch (at runtime) an application's country settings, which shall be absolutely independent from the current window's settings. Setting TFont's charset, most controls successfully show the text taking the new codepage characters. But how to do this for WPTools?

    How can i set the (default) charset for a new doc?

    I tried this (example: RUSSIAN_CHARSET), but this didn't help at all - text is DEFAULT_CHARSET.
    WP->EditOptionsEx = WP->EditOptionsEx <<wpDisableAutoCharsetSelection>AttrHelper()->SetFontCharSet( RUSSIAN_CHARSET );
    WP->DefaultAttr()->SetFontCharSet( RUSSIAN_CHARSET );
    WP->CurrAttr->CharSet = RUSSIAN_CHARSET;

    Another question: When the doc is opened in another country setting environment, is the text correctly shown with the saved charset?

    BTW, having some tests, while editing one doc. WPTools crashed, when often adding, removing and changing window's country settings (you know, the blue symbol 'DE' etc. in the tray) .

    Thank you,
    E. Hess

    Hello!

    Supermerge does not generate a header, if the corresponding header band is "1,2,3 - always visible".

    For header and footer bands, placed within a group band, TWPSuperMerge's PrepareHeader and PrepareFooter events are not thrown.
    Also, in MailMergeGetText event, I have no possibility to find out, whether I'm just within a group's header or footer band.

    Kind regards,
    E. Hess

    Hmm!

    I use this code (BTW, in a DataModule's constructor):

    WPLanguageControl1->Active = true;
    WPLangInterface = new TWPLocalizationInterface( (IUnknown*)*WPLanguageControl1 );

    WPLng = "DE";
    LocStr = "/" + WPLanguageControl1->XMLParent + "/" + WPLng;
    if (WPLanguageControl1->Find( LocStr ) != NULL) {
    WPLanguageControl1->GlobalLanguage = WPLng;
    WPLocalizeLoadForms = true;
    WPTools_LoadVCLStrings();
    WPTools_LoadActionStrings();
    GlobalValueUnit = euCm;
    }

    Please check:
    1. WPLanguageControl1->Active = true ?
    2. To be sure, use 'true', not 'TRUE'.
    3. Is WPLanguageControl1's XML-Tree filled with the DE-translations?

    Kind regards,
    E. Hess

    Zitat


    Error reading cbxShading->ItemIndex: Property does not exist.

    I guess you use BCB 5 as I do.
    cbxShading's ItemIndex got a published property since Delphi / BCB 6, in Delphi / BCB 5 it is not a property. In one of the past WPTools version, Julian reset the ItemIndex to the default value to not appear in the DFM file.
    Unfortunately, the latest WPTools version again had the ItemIndex set to another value instead of the default value.
    The problem is, that this is NOT reported by the compiler but first at runtime, so you will not know, whether the WPTools windows (forms) will really work :-(

    WPCubed should set the cbxShading's ItemIndex to the default value, otherwise you have to remove it yourself out of WpParBrd.dfm.

    Best regards,
    E. Hess

    Hi!

    I placed an TWPLanguageControl *wpLngControl into an TDataModule,
    which is initialized first when the app starts:

    Kind regards,
    E. Hess

    I found out, that the RTF was build with an older WPTools 4 version (4.08 - 4.20, may be).

    I saved the RTF, then after saving, the program hanged up again, but apparently the RTF was succesfully saved (in a changed format).
    After restarting, saving the RTF and running Supermerge were ok.

    BTW, MultiDemo also has problems with this RTF...

    It seems, that WPTools 5 is sometimes not downward-compatible with some RTFs created with an older WPTools 4 version. Did you hear about it? The RTF contains some images.

    But at the moment, the problem is solved for me.

    Kind regards,
    E. Hess

    Hello!

    v5.17.4:
    When one of my reports are created (with TWPSuperMerge), the following assertion is thrown:

    stack par has been changed (...WPRTEReport.pas, line 2857)

    Then, when closing the report window, the program displays "Abnormal program termination" and hangs up.
    The report contains nothing unusual: cascaded bands, headers, footers. What could be the reason?

    Thanx in advance,
    E. Hess

    Hello!

    WPTools 5:
    When opening (e.g. with WPTools 5's Multi-demo) an RTF, which was created with WPTools 4, I noticed, that graphics in table cells now overlap the border.
    In WPTools, there were small cell margins by default. Where have those inner margins gone?

    Thanx for your help,
    E. Hess

    Hello!

    I have some questions concerning the WPTools 5 Premium.
    I checked out your Multi-Demo, "F7 Default Editor".

    From the "Format"-"Columns" menu I choose "2", "3" or "4",
    but I don't see anything changing.
    Is it still under development?

    I insert a text box, move and resize it.
    But what can I else do with the text box?
    I cannot enter text or anything else into the text box.
    What am I doing wrong? Or is it still under development, too?
    When text boxes are fully supported, what can I insert into them,
    and what not?
    You wrote "text boxes ... saved as standard RTF movable shapes".
    What does it mean?
    Can I insert graphics?
    Can I insert tables?
    Can I insert WPReporter bands?
    Can I insert further text boxes?

    Thank you in advance,
    E. Hess

    Hello!

    I want to popup a menu or a form, where I can change some parameters of the selected section : Landscape, margins etc.
    I want this by right-clicking with the mouse onto the section marker (you know: the arrow). It seems, that none of the "AtXY"-function give me this information. So, how to do it?

    I also want to delete a section (mark) - just the mark, but not the paragraphs within this section. How to do this?

    Thanx in advance,
    E. Hess

    Hello!

    In the Page Prop Dialog of MS Word, I have the possibility to determine, what the new adjustments belong to: whole document or current section.
    Would it be too big effort for you to also offer this in TWPPagePropDlg?
    Or does a comfortable solution already exist?

    Thank you in advance,
    E. Hess

    Did not work :-( "Ghost" bands appeared.
    So, I watched the sources and realized the following in the Watermark event (C++ code):

    if (PaintMode.Contains( wppInPaintDesktop )) {
    if ((RTFEngine->LayoutMode == wplayLayout) ||
    (RTFEngine->LayoutMode == wplayFullLayout) ||
    (RTFEngine->LayoutMode == wpDualPageView)) {

    Wprtedefs::TWPVirtPage *vp = NULL;
    TWPRTFEnginePaintPages pp;
    TRect textr;

    if (RTFEngine->GetPaintPage( PaintPageNr, pp, vp)) {

    textr = PageRect;
    textr.Left = textr.Left + Wprtedefs::MulDiv( pp.MarginLeft, XRes, WPScreenPixelsPerInch );
    textr.Right = textr.Right - Wprtedefs::MulDiv( pp.MarginRight, XRes, WPScreenPixelsPerInch );
    textr.Top = textr.Top + Wprtedefs::MulDiv( pp.MarginTop, YRes, WPScreenPixelsPerInch );
    textr.Bottom = textr.Bottom - Wprtedefs::MulDiv( pp.MarginBottom, YRes, WPScreenPixelsPerInch );

    toCanvas->Pen->Width = 1;
    toCanvas->Pen->Color = clSilver;
    toCanvas->Pen->Style = psSolid; // psDot

    if (!pp.Modes.Contains( wpNoXMargins )) {
    if (pp.MarginLeft > 0) {
    toCanvas->MoveTo( textr.Left, textr.Top );
    toCanvas->LineTo( textr.Left, textr.Bottom );
    }
    if (pp.MarginRight > 0) {
    toCanvas->MoveTo( textr.Right, textr.Top );
    toCanvas->LineTo( textr.Right, textr.Bottom );
    }
    }
    if (!pp.Modes.Contains( wpNoYMargins )) {
    if (pp.MarginTop > 0) {
    toCanvas->MoveTo( textr.Left, textr.Top );
    toCanvas->LineTo( textr.Right, textr.Top );
    }
    if (pp.MarginBottom > 0) {
    toCanvas->MoveTo( textr.Left, textr.Bottom );
    toCanvas->LineTo( textr.Right, textr.Bottom );
    }
    }
    }
    }
    }

    This seems to work now.

    Unfortunately, the margins now are also shown in the preview window.
    But for the moment I can live with it.

    Regards,
    E. Hess