Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Dock panels and TWebBrowser

I noticed that when a dock panel has a TWebBrowser, and that panel is dragged, the contents in the web browser is refreshed.  Is there any way to stop the web browser from refreshing, because it affects the smoothness of the docking process?  Thanks in advance.

Comments

  • 6 Comments sorted by Votes Date Added
  • When dock-panel is dragged, its handle, as well as all its children handles, are re-created. TWebBrowser probably can't preserve its content without a handle. There nothing you can do with that.

  • I see, thx.  
  • Hello to all,

    I will post something here in this thread because I have exactly the same problem with the WebBrowser Delphi's component inside a dock, however, the EmbeddedWB component (which is an extended WebBrowser component, to say like that) don't have the same problem: the content of the browser is not "refreshed" nor changes when we "undock" and "dock" a dock panel.

    Certainly I can't say right now what is the difference which cause that different behaviours in the WebBrowser component and the EmbeddedWB component, since the second one is based in the first one.

    Can I ask here if anybody have any idea about how to search for that difference?

    That is, what we must try to implement or change the WebBrowser component (or a descendant) in order to avoid the "refresh" problem when we "undock" or "undock" certain dock panel...

    I need this because my next project want to run in Win32 and win63, and, unfortunately the EmbeddedWB component don't appear to work in Win64, but the WebBrowser work without problems, not to mention the LMD docks component, who also works well in Win64.

    Thanks in advance for any possible idea!
  • Hard to advice something, except of learning source code of EmbeddedWB control (if available).
  • Hello Eugene,

    Thanks for your reply. Certainly the EmbeddedWB source is available here, for example. It's not very clear to me who maintain this project right now. I just want a hint or something like that... since this TWebBrowser descendant appear to be no problem while docked or undocked their parent dock panel.

    If I can finally find something useful... I will post here... even when right now I am considering to use CEF4Delphi, which I did not test yet inside a dock panel...
  • Hello to all,

    Just a bit more information about this thread's issue. Firstly my mistake: "TEmbeddedWB" is not a descendant of TWebBrowser, as we can see in the source code. Dealing with the OP issue, I try with certain Chromium for Delphi project: all works as expected, but, when we place a "Chromium browser" inside a "DockPanel"... lot of exceptions appear when we try to undock the panel.

    Finally I found a solution that apparently (I need more tests, but in principle they works) put working the "TEmbeddedWB" in "Win64".:

    [..]

    With the above, probably "TEmbeddedWB" can be the best option to me, since this "WebBrowser" doesn't have the same problem than "TWebBrowser": we simply can undock and dock our panels without any non desired "refresh".

    Maybe the above information can help to someone who are trying to use a "WebBrowser" control inside a "DockPanel".
Sign In or Register to comment.