Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxDockSite.OnShowControl Event

In This Article

Fires when an auto hide enabled dock control becomes visible.

#Declaration

Delphi
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.

Delphi
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.

Delphi
procedure TForm1.dxDockSite1ShowControl(Sender: TObject; AControl: TdxCustomDockControl);
begin
  AControl.Activate;
end;
See Also