Skip to main content

TdxBarInPlaceSubItem.OnBeforeCollapse Event

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

Declaration

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.

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