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

TdxBarInPlaceSubItem.OnBeforeCollapse Event

In This Article

Occurs before the expanded in-place subitem has been collapsed.

#Declaration

Delphi
property OnBeforeCollapse: TdxBarInPlaceSubItemEvent read; write;

#Remarks

Handle this event to perform specific actions before the in-place subitem has been collapsed. The Sender parameter provides access to the in-place subitem to collapse. The Link parameter references the item link to the in-place subitem’s control being collapsed.

The following code example demonstrates how to handle the OnBeforeCollapse event to prohibit an in-place subitem from collapsing.

Delphi
procedure TForm1.dxBarInPlaceSubItemBeforeCollapse(Sender: TdxBarInPlaceSubItem; Link: TdxBarItemLink);
begin
  Sender.Expanded := True;
  Abort;
end;

To perform specific actions after the in-place subitem has been expanded, handle the OnAfterExpand event.

See Also