TWebPopupMenu created at runtime does not show

I a basic Web project, I am attempting to create a TWebPopupMenu at runtime and it does not show. Possibly i am missing something very simple.

In the sample attached the listbox on the right is using a webpopup from design time and on the left it is using one that is created at runtime. Right works, left does not.

Both are loaded with 5 options.
WebPopMenu.zip (6.4 KB)
Very basic creation, but I am stuck. Any advise appreciated.

  FPopMenu := TWebPopupMenu.Create(self);

  for i := 0 to 5 do
  begin
    lmi := TMenuItem.Create(FPopMenu);
    lmi.Caption := 'Option #' + i.ToString;
    FPopMenu.Items.Add(lmi);
  end;
  ListBox.PopupMenu := FPopMenu;

We've seen this issue and we'll investigate.

Workaround for now:

  FPopMenu := TWebPopupMenu.Create(self);
  FPopMenu.Parent := Self;
  for i := 0 to 5 do
  begin
    lmi := TMenuItem.Create(FPopMenu);
    lmi.Caption := 'Option #' + i.ToString;
    FPopMenu.Items.Add(lmi);
  end;
  ListBox.PopupMenu := FPopMenu;

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.