Howdy, Stranger!

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

In this Discussion

Dock Panel Tab Hints?

How can I get Hit Test information for Dock Panel Tabs in a space zone (document type tabs)?

I need to be able to hover a tab and from that get the corrosponding DockPanel as well as show a hint.

I couldn't see a obvious way to achieve this?
Tagged:

Comments

  • 1 Comment sorted by Votes Date Added
  • Do it something like this:

    procedure TForm30.LMDDockSite1MouseMove(Sender: TObject;
      Shift: TShiftState; X, Y: Integer);
    var
      ht: TLMDDockSiteHitTest;
      zn: TLMDDockZone;
      pn: TLMDDockPanel;
    begin
      ht := LMDDockSite1.GetHitTest(Point(X, Y));
      if (ht.Kind = hkZone) and (ht.ZoneArea = hzaTabs) and
         (ht.Index >= 0) then
      begin
        zn := ht.Zone[ht.Index];
        if zn.Kind = zkPanel then
        begin
          pn := zn.Panel;
          Log('Hover: ' + pn.Name);
        end;
      end;
    end;
Sign In or Register to comment.