Howdy, Stranger!

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

In this Discussion

OnMouseDown issue when dock panel undocked

I have an application that has a form parented on TLMDDockPanel. The form has a TStringGrid on it. When the panel is docked, everything works as expected.

When the panel is undocked, the OnMouseDown event for the grid stops working. The OnMouseUp for the grid continues to work. As soon as I dock the panel to the dock site again, the OnMouseDown starts working again.

A plain TPanel on the same form / dock panel doesn't have the same issue. It's OnMouseDown continues to work.

I have recreated this issue on a fresh sample project. Any ideas?

Comments

  • 7 Comments sorted by Votes Date Added
  • I just checked by placing a TStringGrid directly on the TLMDDockPanel and the same issue occurs, so it's not to do with the parenting of a form on the TLMDDockPanel.

  • If I dock the form directly without using a TLMDDockPanel, the OnMouseDown event works all the time.

    It seems like the TLMDDockPanel is somehow interfering with the OnMouseDown event?
  • I tested only the case where TStringGrid is placed directly on the TLMDDockPanel. I cannot fully reproduce your issue, and in most cases string grid cells are clickable and the control produce OnMouseDown event as it should.

    However, in very specific rare cases, where I undock the panel and move it to a specific screen location, I see the following very unusual scroll-bars behavior. Look at the video:

    https://gofile.io/d/xkq67u

    Since scroll-bars are built-in Windows functionality, so far I cannot even imagine what is going wrong. This really looks like the Windows bug.
  • Why can't you test the case I asked about (form parented to the panel) ?

    I have not seen any issues with the scroll bars, just the OnMouseDown event.

    I have a Delphi XE test project I can email you if required.
  • Why can't you test the case I asked about (form parented to the panel) ?

    Because, you mentioned that the issue happens even if TStringGrid is placed directly on the dock panel.

    I have not seen any issues with the scroll bars, just the OnMouseDown event.

    Yes, but in my case OnMouseDown is also not happening when Windows magically thinks that I'm clicking on scroll-bar. So, probably, these two sides of the same issue. Thats was my point.

    I have a Delphi XE test project I can email you if required.

    Yes, send it to our support email, please. Can you also specify, which LMD version you use.
  • My apologies, I forgot that I tested with no form.

    I'll send you an email with project shortly.

    The version is LMD DockingPack 2020.1 (Apr 6, 2020).
  • After email discussions, it seems that Delphi XE is the source of the bug.

    Changing the base class of
    the TLMDFloatingForm class to TForm in LMD
    DockingPack source solved it.

    Thanks for persevering on this one.
Sign In or Register to comment.