Back to Devexpress

TdxBarInPlaceSubItem.OnBeforeCollapse Event

vcl-dxbarextitems-dot-tdxbarinplacesubitem-5e249330.md

latest1.2 KB
Original Source

TdxBarInPlaceSubItem.OnBeforeCollapse Event

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

TdxBarInPlaceSubItem Class

TdxBarInPlaceSubItem Members

dxBarExtItems Unit