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;