Back to Devexpress

TdxCustomTileControl.OnGroupRemoveWithLastItem Event

vcl-dxcustomtilecontrol-dot-tdxcustomtilecontrol-2bed3006.md

latest2.1 KB
Original Source

TdxCustomTileControl.OnGroupRemoveWithLastItem Event

Enables you to prevent automatic tile group destruction when its last item is removed or destroyed.

Declaration

delphi
property OnGroupRemoveWithLastItem: TdxTileControlGroupRemoveWithLastItemEvent read; write;

Remarks

This event occurs every time the last item in a group is removed or deleted, and the control is about to delete the emptied group automatically. You can assign False to the AAllow parameter within an OnGroupRemoveWithLastItem event handler to keep the emptied group accessible via the AGroup parameter.

For instance, you can preserve emptied named groups (that is, groups with captions):

delphi
procedure TMyForm.dxTileControl1GroupRemoveWithLastItem(Sender: TdxCustomTileControl; AGroup: TdxTileControlGroup; var AAllow: Boolean);
begin
  AAllow := AGroup.Caption.Text = ''; // Allows automatic deletion for all groups without an assigned caption text
end;
cpp
void __fastcall TMyForm::dxTileControl1GroupRemoveWithLastItem(TdxCustomTileControl *Sender, TdxTileControlGroup *AGroup, bool &AAllow)
{
  if(AGroup.Caption.Text != "") // If the group has a caption text
    AAccept = False; // Preserves the emptied group
}

Refer to the TdxTileControlGroupRemoveWithLastItem procedural type description for detailed information on all parameters accessible within an OnGroupRemoveWithLastItem event handler.

See Also

TdxCustomTileControl Class

TdxCustomTileControl Members

dxCustomTileControl Unit