Mike Dixon
Mike Dixon

Reputation: 149

Delphi Firemonkey TWebbrowser doesn't work on modal dialogs

I'm using Delphi XE8, FireMonkey, Win32

I'm trying to load a local HTML file in a TWebBrowser control that is in a modal dialog. I keep getting an OLE error, even when trying to do something as simple as this in a button click:

wbPreview.URL := 'about:blank';

Project WI.exe raised exception class EOleException with message 'Unspecified error'.

I'm thinking that the WebBrowser control doesn't work in a form/dialog that is not the main form of the app.

Does anyone have any insight on this? I've tried placing TWebBrowser on the main form, ensured that TWebbrowser in the dialog wasn't in a child control (parent is the form), etc. Nothing works.

Upvotes: 1

Views: 663

Answers (1)

Tom Brunberg
Tom Brunberg

Reputation: 21045

The error is not related to whether the form is modal or not, but to whether the form hosting the TWebBrowser has default BorderStyle / BorderIcons.

The problem is reported on Embarcadero Quality Portal with RSP-12640 and a few others.

The issue is corrected in Delphi 10.1 Berlin

Upvotes: 1

Related Questions