Beiträge von erikfandersen

    Hi!

    I need to check if my text contains any non-deleted embedded objects before saving. How can I do this?

    I have tried looping through TWPRichText.TextObjects and for each object I have the following function:

    function IsReferred: Boolean;
    var
    Tag: Integer;
    Item: PWPListItem;
    begin
    Tag := Self.WPRichText.Memo.TxtObjLst.FindTag(WPObj);
    Item := Self.WPRichText.Memo.TxtObjLst.Find(Tag);
    if (Item<nil>0) then
    Result := true
    else
    Result := false;
    end;

    Unfortunately this does not work for objects that have been copied from one place to another in the editor.

    Regards,
    Erik

    Hello again,

    i did some debugging and found the offending code in TWPCustomRtf.Edit.SetTabPos:

    else if (tw > 0) and
    ((not FMemo.UseViewport and
    (tw < MulDiv(FMemo.WidthInScreenPixels, 1440, FMemo.Header.FFontXPixelsPerInch)))
    or ((FMemo.UseViewport and (tw < FMemo.FLogWidth)))) then

    The problem is that tw is greater than
    MulDiv(FMemo.WidthInScreenPixels, 1440, FMemo.Header.FFontXPixelsPerInch)

    What is this check doing?

    Regards,
    Erik

    Hello again,

    I tried both the OnShow event and overriding TForm.DoShow without luck.

    Some of the tabs are set but the one's that is beyond the forms border (because the form is not maximized at startup) is not.

    The RichText component is located on a frame. Wordwrap is enabled.

    What next?

    Regards,
    Erik

    Hello again,

    just to elaborate on this, the problem appear to be related to the width of the TWPRichText control. If I try to set a tabpos at 15 centimetres and the control is not wide enough to display the 15 centimetre point in the ruler then the tabpos is not applied.

    /Erik

    Hello!

    I have a problem with TWPRichText.SetTabPos. If I call SetTabPos from the forms oncreate event the tabs are not set. If I add a button to the form and call SetTabPos on the onclick event the tabs are set correctly.

    How can I set the tabs during form creation? It must be done from code.

    I use WPTools 4.25.

    Regards,
    Erik

    Hello!

    In WPTools5 I still have some unresolved issues after my attempt so upgrade from WPTools 4.

    1) In my code I load the contents of WPRichText in the form constructor. I now want to place the cursor at the end of the text. This only works partially using ShowCursor as the cursor is placed at the end but when I start typing the cursor jumps to the beginning of the text.

    2) When I attach a TWPToolBar to a TWPRichText object the font-size indicator does not work very well. When I start working on a new (empty) text it works well but when I save and then reload in a new form the font-size is only displayed for text with a font-size different from the default font in the TWPRichText.

    3) In some of my forms the font is set differently depending on whether I enter the TWPRichText control using the mouse or by tabbing through the form. Tabbing shows incorrect results.

    I hope someone can help. Otherwise I will be happe to create a test-case (for Julian).

    Regards,
    Erik

    Hello!

    After upgrading from WPTools 4 to WPTools 5 is seems that WP_PASTE messages are no longer captured by TWPRichText. Is there a reason for this or will it be added in a later (maby next) release?

    Regards,
    Erik

    Just to clarify. When I double click somewhere inside an empty TWPRichText editor, the last font in the fontlist on the linked TWPToolBar is automatically selected. On top of that two empty fontlines are added to the front of the fontlist. This is on a totally new project linked with WPTools 5.19.6.

    Am I the only person experiencing this problem? It appears to be such an obvious error that I can hardly believe that this is a problem in WPTools...

    Regards,
    Erik

    Hello!

    If I make a new project with a WPRichText and a WPToolbar component I get some wierd results when double clicking in the text field, for whatever reason, the toolbar changes fonttype to Wingdings 3 and looses the fontsize, it also adds some empty fontnames to the dropdown box.
    We're having similar problem selecting text that's been generated in earlier versions of WPTools, after marking some text the toolbar changes to Wingdings 3 and no fontsize.

    What's wrong here?

    Regards,
    Erik

    Thanks Julian,

    I'm happy to report that WPForm 2.50 now works perfectly with WPTools 5.

    It is still my firm opinion that the combination WPForm / WPTools is the ultimate electronic paper form solution for Delphi developers.

    Regards,
    Erik

    I got your e-mail but unfortunately the fix did not work.

    It would seem that RTF support via WPTool5 is broken in WPForm because I can reproduce the error as soon as I link in WPFRtf5.pas in my project.

    This is a complete show-stopper for me and my efforts to upgrade to WPTool5 and WPForm 2.50 and I need help!

    /Erik

    Hello!

    I need to convert some of my WPForm forms to TIFF and I'm looking for a good solution to this problem. Any suggestions?

    Specificall I need to convert multible page WPForm's to Multi-page TIFF G4 format in 200 dpi black and white. The forms may be in color prior to conversion.

    Regards,
    Erik F. Andersen

    Thanks, but your solution is not quite good enough for me because I want the bookmark line to be the topmost visible line.

    If I first position the cursor at the bottom on the document and then issue a BookmarkMoveTo before calling ShowCursor then the result is very near to what I want and a perfectly fine solution for me.

    Regards,
    Erik

    Hello!

    I have a problem after upgrading from WPForm 2.30 to WPForm 2.50 and WPTools 4 to WPTools 5. When I try to print a specific WPF I get an Access Violation deep inside WPForm. Here is the stack trace. Many someone can help?

    The "obj" parameter is NIL for some reason.

    Exception 'EAccessViolation' in module Aeskulap.exe at 005CCBC8
    Access violation at address 009CDBC8 in module 'Aeskulap.exe'. Read of address 00000000

    Module: WPFRTF5, Source: WPFRTF5.pas, Line 964
    Procedure: Wpfrtf5.WPFOnCanvasToRTFObject

    :009CDBC8 [Aeskulap.exe] Wpfrtf5.WPFOnCanvasToRTFObject (WPFRTF5.pas, line 964)
    :007C5400 [Aeskulap.exe] Wpfgr.TWPFGGraphicText.Print (WPFGr.pas, line 9989)
    :007D6AB9 [Aeskulap.exe] Wpfattr.TWPFCustomEditorEngine.PrintPageOnCanvas (Wpfattr.pas, line 3478)
    :007E266D [Aeskulap.exe] DoPrintPage (WPFrm.pas, line 3136)
    ---
    :007E2729 [Aeskulap.exe] Wpfrm.TWPFEditorEngine.PrintPage (WPFrm.pas, line 3151)
    :007E2E2D [Aeskulap.exe] Wpfrm.TWPFEditorEngine.Print (WPFrm.pas, line 3379)
    :007EC395 [Aeskulap.exe] Wpfrm.TWPFormEditor.Print (WPFrm.pas, line 7437)

    Regards,
    Erik