BerndGabriel / HtmlViewer

The well-known Delphi/Lazarus HtmlViewer/FrameViewer
Other
395 stars 147 forks source link

Control not working in Lazarus 3.99 on Linux. #334

Closed CardanoDVPR closed 1 year ago

CardanoDVPR commented 1 year ago

I am currently facing some challenges with this control in Lazarus in Linux.

The problem I am experiencing is as follows:

Demo Code: The HTMLViewer control included in the package works perfectly fine when I run the provided demo code. However, when I start a new program and add the control to a form, it tends to cause issues with the Lazarus IDE. The problems themselves are not consistent, but there are consistently problems (i.e. it never functions correctly in the IDE).

Appearance: When I place the HTMLViewer control on a TPanel, as demonstrated in the sample code, it has a different appearance compared to the control in the demo. This appearance (and behavior -- see below) is no different when placed directly on the form. Specifically, it has a black background instead of the expected appearance. This inconsistency in appearance is puzzling.

Design-Time Behavior: After adjusting the size of the control and clicking off the form, I am unable to make any further changes to its size or location by clicking on the control. Right clicking on the control provides no information either. It's as if the control does not exist. While the form will compile, I can't get any HTML code to appear (I haven't tried very hard on this part because something seems wrong).

Compilation Error: If I replace the HTMLViewer control in the demo code with another instance of the control, it behaves normally during design time. However, when I attempt to compile the program, it raises a SIGSEV error with "Result := FSectionList.ShowImages" on line 2838 in the HtmlView.pas file.

I am using the following versions of Lazarus and Free Pascal:

Lazarus: 3.99 (rev main_3_99-23-gf4e5dd4903) Free Pascal: 3.3.1 Target platform: x86_64-linux-gtk2

Any help would be appreciated. I just want a light HTMLview control, not a full browser. Thanks.

BerndGabriel commented 1 year ago

Thanks for spotting this issue.

Looks like you are using HtmlViewer 11.9. Please try again with latest HtmlViewer 11.10. It contains fixes for the described issues. I could not produce ecxeptions with Lazarus 3.99 (built today) and FreePascal 3.2.2 on LinuxMint 21.

CardanoDVPR commented 1 year ago

Oh my. How did I miss a later version? Thank you. My code now works nicely.