Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TMS ToolPanels
Programmatically make a panel floating on double click on caption

Following event handler for the TAdvToolPanel.OnDblClick will check if the double click is on the panel caption and if so, make the panel floating:
procedure TForm2.AdvToolPanel3DblClick(Sender: TObject);
var
  pt: TPoint;
  r: TRect;
begin
  GetCursorPos(pt);
  pt := (Sender as TAdvtoolpanel).ScreenToClient(pt);
  if (pt.y < 20) then
  begin
    r := (Sender as TAdvtoolpanel).ClientRect;
    advtoolpanel3.ManualFloat(r);
  end;
end;