TdxDockSite.OnShowControl Event
Fires when an auto hide enabled dock control becomes visible.
Declaration
property OnShowControl: TdxAutoHideControlEvent read; write;
Remarks
Dock controls with their auto hide feature enabled can be made visible by pointing to their corresponding labels with the mouse pointer. You can also make such a control visible using code by assigning it to the ShowingControl property of the owning dock site. In both cases, the OnShowControl event is raised.
Handle the OnShowControl event if you need to perform actions each time a dock control becomes visible. If you need to respond to hiding the control, handle the OnHideControl event.
The Sender parameter of the OnShowControl event specifies the dock site where the control being shown resides. The AControl parameter identifies the dock control itself.
The code below handles the OnShowControl event to activate the control being shown. In this case, the control being shown will not be automatically hidden when the mouse pointer leaves it. End-users will have to click outside the control to hide it again.
procedure TForm1.dxDockSite1ShowControl(Sender: TObject; AControl: TdxCustomDockControl);
begin
dxDockingController.ActiveDockControl := AControl;
end;
Alternatively, you can call the control’s Activate method as shown in the following code snippet which is equivalent to the above code.
procedure TForm1.dxDockSite1ShowControl(Sender: TObject; AControl: TdxCustomDockControl);
begin
AControl.Activate;
end;