Does anyone else use UnderlinesTextMode?

If I understand the documentation correctly, when I set UnderlinesTextMode, the report should underline only the text in the memoview lines, but not the spaces between text. That is not happening for me. It underlines the whole line.

Comments

  • PolomintPolomint Australia

    G'day,

    The cheeky answer is "no we don't"! But the useful answer follows...

    Exactly how are you using this, and which version of FastReport are you using? Are you changing the property/ies of a TfrxMemoView Object?

    Reason I ask is that after looking at the source for FR Vcl v2023.1.3 it occurs to me that you might be doing this in code and setting the Underlines Property to "True" after setting the UnderlinesTextMode to your preferred value.

    If you do that the code ignores your choice of "ulm" value! The relevant section of code from frxClass.pas is attached here.

    Sorry I don't have time right now to build a test-bed to verify this, but I suspect you should raise a Support Ticket. :-)

    Cheers, Paul

    <code>

      /// <summary>

      ///  Deprecated(See UnderlinesTextMode property). Determines whether to

      ///  show underlines under each text string. Default value is False.

      /// </summary>

     : : : : : : : :

    procedure TfrxCustomMemoView.SetUnderlines(const Value: Boolean);

    begin

     if not Value then

      FUnderlinesTextMode := ulmNone

     else

      if FUnderlinesTextMode = ulmNone then

       FUnderlinesTextMode := ulmUnderlinesAll;

    end;

    </code>

  • Thanks for your response! 2023.2.1 is the version of Fast Reports I am using, and I am setting the properties of a TfrxMemoView Object. Originally, I had set the Underlines property to True and the UnderlinesTextMode to ulmUnderlinesText, then I tried it programmatically in that order. I commented out my code and went back to the design screen.

    I noticed that when I set the Underlines property to True, the design screen sets UnderlinesTextMode to ulmUnderlinesAll just as you described, and I have to reset it to ulmUnderlinesText. But when I run the example, it still underlines the spaces as well as the text. Maybe they consider spaces to be text?

    I agree that I need to raise a support ticket, but first I want to see how this Underline property is related to the Underline property in the fonts, as in

    CRpt.Label1.Font.Style := [fsUnderline];

    Is the line above setting the same property as this line?

    CRpt.Label1.Underlines := True;

    I want to be able to enter as much helpful info as I can in the ticket.

    Thanks again for your help. I wish I had thought to look in the source.

  • Ticket 931522 has been created. I discovered that I can display underlines using font properties and set the Underlines property to False, but it still affects the entire line. The font and underline property seem to be independent of one another.

  • PolomintPolomint Australia

    G'day,

    The Font and the Underline Property are independent. The first is handled by the Operating System's functionality, the second is managed by the DrawText Method of the TfrxCustomMemoView Component in the FastReport code.

    Good luck with the Ticket. I have always found the Support Staff very helpful and prompt at responding, even when they don't agree with me! ;-)

    Cheers, Paul

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.