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

TdxCustomTileControl.OnActionBarsHide Event

In This Article

Enables you to respond to hiding action bars caused by specific actions and prohibits the change.

#Declaration

Delphi
property OnActionBarsHide: TdxTileControlActionBarVisibilityChangeEvent read; write;

#Remarks

The Sender parameter references the tile control.

The AReason parameter specifies what caused action bars to be hidden. Refer to the TdxTileControlActionBarVisibilityChangeReason type description to learn about the available parameter values.

Pass True as the AHandled parameter to prohibit hiding action bars in response to the AReason action.

The following code example shows how to handle the OnActionBarsHide event to prohibit hiding action bars in response to left- or right-clicking a specific action button (actionBarItem).

Delphi
procedure <Form>.<TileControl>ActionBarsHide(Sender: TdxCustomTileControl; AReason: TdxTileControlActionBarVisibilityChangeReason; var AHandled: Boolean);
begin
  if ((AReason in [abvcrActionButtonClick, abvcrMouseRightClick]) and
    ((Sender.ActiveHitTest.HitObject <> nil) and
    (Sender.ActiveHitTest.HitObject is TdxTileControlActionBarItemViewInfo) and
    (TdxTileControlActionBarItemViewInfo(Sender.ActiveHitTest.HitObject).Item = actionBarItem))) then
    AHandled := True;
end;

This event handler sets the AHandled event parameter to True only when an end-user clicks the actionBarItem action button. To ascertain that this button is clicked, the event handler identifies the UI element located under the mouse pointer using the ViewInfo object returned by the tile control’s ActiveHitTest.HitObject property.

Handle the OnActionBarsHide event in combination with the OnActionBarsShow event to completely control switching the action bar visibility.

See Also