Beiträge von wpsupport

    Thanks for finding wpdrawfineunderlines, it was specially implemented for that reason. It is a matter of taste if you want to adapt the line thickness to the font height. WPTools is not using the fsUnderline style for text output internally, since that will not draw continues lines with text of different sizes.

    WPTools always creates its virtual pages when formatting the text and right now they have a certain height. Since there can be also header and footer it would also be pretty difficult to do otherwise so it actually creates those breaks.

    But why not simply make the pages really height? You can use the event OnMeasurePageHeight to do this without having to mess with the setup of the RTF page information.

    Windows always pains at least a hair line, even when the Pen.Width = 0, so this is not the problem.

    But when the lines become very small it is possible that the following line paints over the previous after the scaling has taken place.

    Scaling is internally done because WPTools is resolution independent. It always calculates a defined dpi setting.

    Please see chapter "Programming/Introduction/WYSIWYG" in the manual for more information.

    You can set the flag wpfAlwaysFormatWithScreenRes in the property FormatOptions of the TWPRichText if you do not need WYSIWYG.

    It happens often that despite calling Invalidate the control is not painted.

    This is usually the case when the Invalidate routine is called in the context of user input.

    To solve the issue you need to set a flag in "Invalidate" and as soon as the application is idle call Invalidate.

    This code can be used to create a procedure which is called when the application is Idle:


    This is the message handler which is called when in the Idle cycle:

    Code
    procedure TCustomTool.IdleMessageHandler(const Sender: TObject; const Msg: System.Messaging.TMessage);
    begin
      if FNeedInvalidate then
      begin
        FNeedInvalidate := false;
        InvalidateRect(RectF(0,0,Width,Height));
      end;
    end;

    I hope this is helpful,

    Julian

    Die TWPToolbar hat eine property ButtonHeight welche man an die aktuelle Auflösung anpassen kann.

    Wenn Sie dann auch die erneuerte TWPImageList verwenden die teil von WPTools 9.1 ist, dann können automatisch Icons in höherer Auflöung geladen werden.

    Bei WPTools 9.1 reicht es oft bereits aus, die unit WPICONS dem Projekt hinzuzufügen. Dann werden die Icons als Resource geladen. Eine WPImageList instanz wird dann automatisch erstellt.

    Hi,

    if you have a linked image this effect is normal. The images are linked to a file and stay that way.

    You get around this by using the OnRequestHTTPImage event and there set the image Filename and Streamname to ''

    You can also use SaveToFile( filename, false, 'RTF-AlwaysEmbed')

    or

    TWPRichText.AsANSIString('RTF-nobinary,-alwaysembed');

    Ein TWPRichText ist nie "echt" transparent. Die Transparenz wird simuliert indem der Hintergrund zwischengespeichert wird und vor der Ausgabe des Textes ausgegeben. Mit ViewOptionsEx := [wpDontClearPageBackground] wird der Seitenhintergrund nicht gezeichnet, sofern man einen solchen mittels LayoutMode ausgewählt hat. Aus technischen Gründen führt die Wahl von Transparenz dazu, dass auch die Scrollbar verschwindet. Aus diesem Grund kann es sinnvoll sein, anstatt Transparenz zu verwenden, selber einen passenden Hintergrund in das TWPRichText zu zeichnen. Dafür bietet sich das Event OnPaintDesktopBackground an.

    Ein TWPRichText label hat kein Fenster und ist daher schon von Natur aus "echt" transparent. Allerdings kann es dadurch nicht den Focus erhalten und bekommt keine Windows messages. Ist daher nicht vergleichbar.

    Sie müssen command aufrufen mit dieser command id:

    COMPDF_RenderDrawobjects = 522; // Renders the objects. IntPar is the mode.

    // Returns the number of rendered objects. (Use IntPar=128 to count only)

    // This are the bits:

    // 1 : RenderAnnotations - Render the annotations which are not widgets and not Popups

    // 2 : RenderWidgets - Render widgets annotations/

    // 4 : RenderPopups - Render popup annotations

    // 8 : DeleteRenderedObjects and Annotations

    // 16 : UseOriginalDataForRendering (use originla field values for widgets)

    // 32 : UnderPageLayer - Render the draw objects under the page

    // 64 : OverPageLayer - Render the draw objects over the page (or document draw objects)

    // 128: Do not render or delete. Just count how many objects would be affected

    Please note that the 3. and 4. COMPDF_GetTextFilterRect parameters are X1 and Y1 values, not Width and Height.

    I used this code to test: