Skip to main content

TdxCustomRibbon.OnHideMinimizedByClick Event

Enables you to provide custom processing for mouse clicks that result in hiding a minimized Ribbon.

Declaration

property OnHideMinimizedByClick: TdxRibbonHideMinimizedByClickEvent read; write;

Remarks

A minimized Ribbon can be temporarily displayed by clicking any tab. Then end-users can hide it again by simply clicking outside of it. The OnHideMinimizedByClick event is raised immediately after such clicks. It enables you to specify whether the target window processes the click or the click should only hide the Ribbon.

Pass False to the AAllowProcessing parameter to prohibit a mouse click from being processed by a window whose handle is passed as the AWnd parameter.

The AShift parameter determines the state of the Alt, Ctrl, and Shift keys and mouse button states.

The APos parameter identifies the point (in screen coordinates) being clicked.

The following code snippet represents the OnHideMinimizedByClick event handler of the RibbonNotepadDemo shipped with the ExpressBars Suite. This event handler allows the editor’s text selection to be preserved when an end-user hides the minimized Ribbon by clicking the editor.

procedure TRibbonDemoMainForm.RibbonHideMinimizedByClick(Sender: TdxCustomRibbon; AWnd: HWND; AShift: TShiftState; const APos: TPoint; var AAllowProcessing: Boolean);
begin
  AAllowProcessing := AWnd <> Editor.Handle;
end;
See Also