I am currently trying out the TSplitView component in Delphi 10 Seattle. The structure looks like the following:

[![enter image description here](https://i.stack.imgur.com/AL5L9.png)](https://i.stack.imgur.com/AL5L9.png)

With the second TButtonCategory I am trying to create items programmatically with the following code:

```
procedure TMainF.DynamicMenuButtonClick(Sender: TObject);
begin
  if sender is TButtonItem then //false
    ShowMessage('Sender is TButtonItem'); 

  if sender is TCategoryButtons then //true
    ShowMessage('Sender is TCategoryButtons'); 
end;

procedure TMainF.FormCreate(Sender: TObject);
var
  i: integer;
begin
  for i:=0 to 10 do begin
    catMenuItems.Categories[1].Items[i] := TButtonItem.Create(catMenuItems.Categories[1].Items);
    catMenuItems.Categories[1].Items[i].Caption := 'Something';
    catMenuItems.Categories[1].Items[i].OnClick := DynamicMenuButtonClick;
  end;
end;

```

In the "DynamicMenuButtonClick" procedure I want to get information about what button was clicked, the problem is that the sender which is of type TCategoryButtons doesn't tell me that. Now I was wondering if I am just missing out on something or if this is indeed just not possible.