TMSFNCWebBrowser and TMSFNCMAP don not work on dynamically created TFrame (Windows and Android)

I figure you already know about this, but I cannot have a TMSFNCWebBrowser or TMSFNCMap on a dynamically loaded TFrame.

The WebBrowser gives a "Cannot initialize" error in Windows and neither work when run on Windows or Android.

I have been able to make the Map work when initialized on a TForm->TTAbItem and then reparented at runtime.

Hi,

We are aware of this, using frames is actually not recommended. There are alternatives by manually calling Initialize when reparenting, but it is always better to keep TTMSFNCBrowser or descendants on the main form.

Is this something that is going to be fixed, hopefully shortly? I have a need to have multiple instances of the browser on one Frame. I'm using it to simply display HTML formatted text and the other HTML controls you have the HTML is too complex for them.

We already done improvements in the area of reparenting and will investigate the frames as soon as possible.

Hi, just for making sure that we are testing under the correct circumstances, can you provide a sample that demonstrates the exact issue?

OK, I'll put something together.

I am trying to use TMSFNCWebBrowser in a dynamically created frame. In the designer, it shows the "successfully initialized", but when I run my program (both in the IDE or standalone) I get the "Could not initialize..." message. When I continue to run the program, the browser window is there (including saying "Edge Chromium 91.0.864.59 is successfully initialized!), and I am able to go to URLs, etc. The only issue there is that it is not situated in the client area where it is supposed to be (it is up and left of where it is supposed to be). Moving the mouse cursor, it acts like the browser is where it should be as links highlight when the cursor is below and to the right of the link about the same amount as the browser is off from the client area.

Any thoughts or suggestions?

Hi, can you send us a sample demonstrating the issue?

Do you have news about this problem ? i face the same behavior.
If I use Fmx TWebBrowser in my frame no problem, as soon as i use FncWebbrowser i have the message reported as Mark reported

1 Like

Is this something with a dynamically created frame? If so, please call Initialize after creating the frame to properly initialize the browser.