Welcome, Guest
Username: Password: Remember me
General discussions, feature requests for CodeTyphon Project and discussions that don't fit in any of the other specific CodeTyphon forum categories.
  • Page:
  • 1

TOPIC:

After upgrade to CT 6.5, THtmlViewer's html content disappeared when clicking on 5 years 8 months ago #11790

  • Tom.J
  • Tom.J 's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
After upgrade to CT 6.5, HtmlViewer's HTML content disappeared when clicking on it.
But it works fine in CT 6.4.
OS: Windows 10

1. Download test.zip from the attachment.
2. Open aa.ctpr with CT 6.5.
3. RUN
4. Click on "button1"
5. The following HTML content will display in the control "HtmlViewer1"


6. Click on the control "HtmlViewer1"


unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, HtmlView;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    HtmlViewer1: THtmlViewer;
    procedure Button1Click(Sender: TObject);
  private

  public

  end;

var
  Form1: TForm1;

implementation

{$R *.frm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
var
  html: String;
begin
  html:=
'<html>                         ' +
'<head>                         ' +
'</head>                        ' +
'<body>                         ' +
'<p>                            ' +
'  This is a test. <br>         ' +
'  This is a test. <br>         ' +
'  This is a test. <br>         ' +
'</p>                           ' +
'</body>                        ' +
'</html>';

  self.HtmlViewer1.LoadFromString(html);
end;

end.

Tom.J

Please Log in or Create an account to join the conversation.

Last edit: by Tom.J .

After upgrade to CT 6.5, THtmlViewer's html content disappeared when clicking on 5 years 8 months ago #11791

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Thanks Sir

Please Set
on HtmlViewer1: THtmlViewer properties

BorderStyle:=htNone or htSingle

New pl_HtmlViewer 6.6 has
BorderStyle:=htNone; on Create
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: Tom.J

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

After upgrade to CT 6.5, THtmlViewer's html content disappeared when clicking on 5 years 8 months ago #11792

  • Tom.J
  • Tom.J 's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Thanks Sternas.

After set the property BorderStyle:=htSingle, It works.

But there is no member: self.HtmlViewerContent.DocumentSource, It works fine in CT 6.4.

How could I get the HTML source code in the HtmlViewer?

Tom.J

Please Log in or Create an account to join the conversation.

Last edit: by Tom.J .

After upgrade to CT 6.5, THtmlViewer's html content disappeared when clicking on 5 years 8 months ago #11793

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Sorry :blush:

from pl_htmlviewer ver 6.5

THtmlViewer.DocumentSource => THtmlViewer.Text
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

After upgrade to CT 6.5, THtmlViewer's html content disappeared when clicking on 5 years 8 months ago #11794

  • Tom.J
  • Tom.J 's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Thank you very much.

Tom.J

Please Log in or Create an account to join the conversation.

  • Page:
  • 1