Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Disabling Hyperlink Detection

edited August 2015 in General
Hi list,

TPPCustomText contains a property named
fHyperlinkEnabled(default=true), which decides whether a label starting
with www/http/https will be converted to a hyperlink in blue fontcolor
and underlined.
How can i set this value to false without changing the sources?
Are there any ini files to be changed, even more for other properties?

Tia Carsten

Comments

  • edited August 2015
    Hi Carsten,


    No, but this is a nice idea and we will consider it for a later release.

    You can use the TppDesigner.OnCreateComponent to initialize certain
    report components as they are added to the report.

    procedure TForm1.ppDesigner1CreateComponent(Sender: TObject; Component:
    TComponent);
    begin
    if Component is TppCustomText then
    TppCustomText(Component).HyperlinkEnabled := False;

    end;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2015
    Also,

    If you are loading reports as templates, you can create a report object
    loop to check and change any component properties using the
    Report.Template.OnLoadEnd event. If your reports are on forms, you will
    need to do something similar before they are printed.

    http://www.digital-metaphors.com/rbWiki/Delphi_Code/Layouts/Report_Object_Loop

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2015
    Obviously a detection runs while entering the text or upgrading from an
    older version.
    Undoing means rechanging the font which is saved within the template.

    Nico Cizik (Digital Metaphors) erklärte :
  • edited August 2015
    Hi Carsten,

    When HyperLinkEnabled is True, the font of the text is altered to use
    the HyperLinkColor and the text is underlined during report generation.
    The actual Font saved with component is not changed. If you set the
    HyperLinkEnabled property to False before the report is printed, you
    will get the original text.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.